God as husband; Israel as wife
Here’s what it means
God’s covenant with Israel is pictured as a marriage demanding exclusive loyalty and faithfulness.
Why the Bible says it this way
The writer uses a picture to explain one thing by describing it as another.
A helpful detail: The metaphor explains why idolatry is called adultery. The historical people and covenant are still real.