A law doesn't have to be easily enforceable to effectively say, "society says this is wrong." Such a statement goes a long way toward compartmentalizing and rending the practice of such anti-social behavior to an insignificant sub-culture.
Either you should enforce a law or not have it on the books. If you intend to enforce a sodomy law, then the level of intrusion into people’s lives would be excessive.
Keep in mind you said ‘virtually never’ which is a translation for selectively and that means you have given carte blanche for the state to inflict coercive power on a whim (which means treating people will pull differently with people out of favor).
But I will state that when SCOTUS struck down the sodomy laws in the most recent case on the subject, they did it by pulling it out of their rear end. There was no real justification since such laws were fully within the rights of states to pass. There was even a fairly recent precedent to the contrary which they tossed with no justification.
It is also apparent to me that you are putting the cart before the horse. The social mores have changed, and that was not a function of the law. The changes in laws are a function of those changing mores.
The real truth is that when you create intrusive laws to enforce the morals you want, you merely create the tools that people with other views on morals to impose their views in the future.