In verses 18-23 we have seen man turning away from God and refusing to worship Him, thus breaking the first three commandments of the Decalogue. Man breaks first three commandments Man breaks the rest of the commandments. That is what happens in this passage. God answers the prayer of the unbeliever who desires God to leave him alone and allow him to go his own way. That way is a downward spiral.
Sin is the punishment for sin.
Sin begets sin which begets more sin. Therefore God gave them over in the lusts of their hearts to impurity, so that their bodies would be dishonored among them. For they exchanged the truth of God for a lie, and worshiped and served the creature rather than the Creator, who is blessed forever. The first area where God is said to have given man over is in the area of the lusts of their hears to impurity so that their bodies would be dishonored among them. There are many kinds of impurity.