When a people leave the one true and living God and serve idols, those people commit harlotry, but why do they do it? Ezekiel 16 shows the heart of idolatry. Notice the focus,
“You took some of your garments and adorned multicolored high places for yourself, and played the harlot on them. Such things should not happen, nor be. You have also taken your beautiful jewelry from My gold and My silver, which I had given you, and made for yourself male images and played the harlot with them. You took your embroidered garments and covered them, and you set My oil and My incense before them. Also My food which I gave you—the pastry of fine flour, oil, and honey which I fed you—you set it before them as sweet incense; and so it was,” says the Lord God (Ezekiel 16.16–19).
The people of Jerusalem made high places for themselves, and they made for themselves male images. Their focus went from the God of heaven to their own desires and they created their own gods, whom the Jews would use to justify their sin.
What is the focus of your life? If it is anything other than the God of heaven, you will go astray and find ways to justify it.