Ortlund1 suggests that the abrupt mention is deliberately odd, demonstrating the strange way that Israel had misplaced their love away from God toward the Baals. He links this back to Hosea 2:1–23, where God chastises his people for their trivial and earthly pleasure,
which make the Baals attractive, concluding that sensate Israel does not hunger for the spiritual things Yahweh offers.
Instead of knowing God (Hosea 2:8), Israel was fixated on the fertility cult of the Canaanite religion, along with all its earthly benefits (Hosea 2:5, Hosea 2:12). They had forgotten their God (Hosea 2:13), falling into idolatry and manmade religion. The raisin cakes highlight the stupidity of their disobedience.
Of course the eating of raisin cakes was not inherently sinful, but they are tied to the worship of other gods.
So Dearman2 writes: such cakes illustrate the turning to other deities opposed by the prophet.
Stuart3 takes this further, writing: She loves evil; they love raisin cakes, a synecdoche for heterodox indulgence. Raisin cakes [were] sweets made from pressed and dried grapes...prized as a delicacy…By Hosea’s time they were probably routinely associated with cultic worship, the fitting metaphorical food of the religious nymphomaniac who seeks spiritual and material gratification from other gods than Yahweh.
1 And the LORD said to me, “Go again, love a woman who is loved by another man and is an adulteress, even as the LORD loves the children of Israel, though they turn to other gods and love cakes of raisins.”