Why would God's law specifically prohibit 'cult prostitutes' and 'sodomites'? It wasn't just about general immorality, but about a practice deeply intertwined with the worship of other gods.
This verse directly confronts practices that were common in the surrounding pagan cultures. Many ancient religions incorporated sexual acts, including prostitution and homosexual acts, as part of their worship rituals to appease or honor their deities (like Baal, Ashtoreth, or Venus).
Sacred Prostitution: The Hebrew terms used here, 'kedeshah' (whore) and 'kadesh' (sodomite), often refer to individuals consecrated or dedicated to these pagan deities for sexual service. It was a way of trying to secure divine favor or fertility through sexual acts.
Israel's Distinctiveness: God was establishing Israel as a unique people, set apart for Him. Their worship was to be pure and distinct from the surrounding nations. Allowing these practices would have been a direct compromise, blurring the lines between the worship of the one true God and the idolatrous practices of the world.