Why did God tell Hosea to marry a prostitute

The prophet Hosea was commanded to marry an unfaithful wife, and this set up a model of Israel’s broken relationship with God. Israel had been chosen and loved by God yet had been unfaithful to Him by way of idolatry. Just as Hosea redeemed his estranged wife and sought to continue his relationship with her, God promised to redeem Israel and renew their relationship with Him. The story of Hosea and Gomer is an unforgettable picture of God’s strong, unending love for His covenant people.