Every point that was made with the Israelites was pointing to our relationship with God. The entire Old Testament is the revealing of WHO God is, it is the execution of the law on mankind for our sin, it is the foreshadowing of the need for a savior, the foretelling of the savior and a love story of God's love for us.
The marriage relationship mirrors our relationship with Christ as His bride. When we walk away from "our first love" we reap death and destruction. There is no life apart from Christ ... only death.
Much like the discussion of the she bear the other day ... the prophet cursed them but it was God who called down the judgment.
These passages at face value, standing alone, do not seem to follow what we have been taught about God. But ... He does not change. Same yesterday as today as tomorrow. Praise God for His mercy.