God speaks in mental pictures. If you consider the relationship between a man and a woman as a similitude of the relationship between God and His people, you can understand how He feels when His woman gives her good stuff to another. In many different places, God makes mention of Israel as His wife and He is as her husband.
In Ezekiel, chapter 23, Israel – the northern kingdom of Samaria is spoken of as Ahola and her sister Judah is as Aholibah. First Ahola committed whoredoms with the Assyrians and she defiled herself with idols. Hence; idolatry is equated with committing adultery against God. When Aholibah /Judah saw this, she did more in her whoredoms than her sister.
Both of these sisters committed whoredoms in that they turned away from their husband and doted after other gods. For this reason, their God gave them over to their lovers and their ways. For this reason, they have been oppressed and given over to all manner of suffering. But if they return to Him, He has promised to take them back.
They say, if a man put away his wife and she goes from him and become another man’s, shall he return unto her again? Shall not that land be greatly polluted? But you have played the harlot with many lovers; yet return again to me, says the Lord.
Lift up your eyes unto the high places, and see where you have not been lain with. In the ways you have sat for them as the Arabian in the wilderness; and you have polluted the land with your whoredoms and with your wickedness.