Old covenant, DP. No longer binding.
It is when some find it convenient to cherry pick.
My ancestors wrote the damn thing over 700 years, with multiple authors and no editor (two conflicting versions of a creation myth).
en.wikipedia.org
If you read the Old Testament carefully, you can see the transition from a Bedouin herder culture (the crime in Sodom was not sodomy but mistreatment and lack of hospitality to strangers - Lot offers his daughters to be gang raped rather than turn over the Angels, what a Dad!) - which makes sense from Bedouin morality where hospitality to strangers in a harsh environment was expected.
Note that later on, the sin became modified:
Ezekiel 16:48–50
[24] Behold, this was the iniquity of thy sister Sodom: pride, fulness of bread, and careless ease was in her and in her daughters; neither did she strengthen the hand of the poor and needy. And they were haughty, and committed abomination before Me; therefore I removed them when I saw it."
Now the sin is a lack of economic and social justice, this is more of a focus of an urbanized society where poverty is a major issue - much of Deuteronomy basically lays out regulations to help the poor (leave the edges of your fields unthreshed so the poor and the widows can gather food) and mandates charity.
See Deuteronomy 15.