When the LORD first spoke through Hosea, the LORD said to Hosea, “Go, take to yourself a wife of harlotry and have children of harlotry; for the land commits flagrant harlotry, forsaking the LORD.” So he went and took Gomer the daughter of Diblaim, and she conceived and bore him a son. [Hosea 1:2-3]
Hosea was instructed to marry a woman of harlotry. Some commentaries believe that Gomer became a harlot after the marriage, while some believe Gomer was already a harlot before the marriage, while some believe this was a parable and did not really take place. In any case, that is not the discussion of this post. I am taking the stand that Gomer was a harlot before marriage.
The purpose of that marriage was to show the people, who had been unfaithful to the LORD by practicing idolatry, their relationship with the LORD. In that marriage, Hosea most probably suffered shame, and ridicule from his friends and relatives. Gomer, on the hand, had a chance to break away from her occupation, and become a member of a decent family. It was certainly a bad deal for Hosea, and a good deal for Gomer.
There is the shadow of Christ in this marriage. On the cross, Christ bore our sins and shame. By His blood, sinners like us are redeemed, and accepted into the family of God. This is made possible by His grace and love, not our works.