In reading Hosea, we’re reminded of what took place at Sinai: the marriage covenant between God and Israel. That’s where Israel became God’s wife, as it were. This way of characterizing the relationship is commonplace in the prophets. God is the provider and protector of Israel like a man is for his wife; and Israel is to be faithful to God as a woman is to be faithful to her husband. When Israel goes off to worship other gods, they are compared to an adulterous woman stepping out on her husband and violating her vows.
This is what we have in the book of Hosea. Hosea is speaking to Jehovah’s unfaithful wife. The whole book is about the pain God experienced over Israel’s adulterous behavior (i.e., worshiping other gods). Hosea himself will become an object lesson. The Lord orders him to marry a prostitute for illustrative purposes for all the world to see what it was like for God to have married Israel