The LORD is a jealous God. He wants to be our center of attention, center of focus, center of our very being. He doesn't want to compete with outside forces that take our focus away from Him. He wants our loyalty, all of it. He wants love, all of it. He wants our heart, all of it.
This is why the prophets use the illustration of marriage. The church is the bride of Christ and we are in an exclusive relationship with him.
James 4:4 You adulterous people, don’t you know that friendship with the world means enmity against God? Therefore, anyone who chooses to be a friend of the world becomes an enemy of God. Or do you think Scripture says without reason that he jealously longs for the spirit he has caused to dwell in us ?
James 4:7 Submit yourselves, then, to God. Resist the devil, and he will flee from you.