In this chapter, unfaithfulness to God is compared to a wife engaging in prostitution. Israel, which has already been destroyed, is described as having wandered so far from God that he allowed them to be defeated, like a husband would divorce an unfaithful wife. Jeremiah is urging Judah to turn from their worship of other gods. God is the faithful husband, but they are pursuing other gods who they think can give them something they want.
We don’t typically get tempted to worship other gods, but we are tempted to pursue ways of gaining benefits other than doing what God wants. Maybe it’s dishonest business practices, inappropriate relationships, substance abuse, or not loving others. According to this chapter, it’s not so much the activity itself God finds offensive, but that we pursue something other than him to find our fulfillment.