By 2003, most of those laws had been repealed. But Texas, and a few other states, kept those statutes in force. And the Texas law, unlike those in many states, limited the prohibition to same-sex activity.
In 1998, John Lawrence and Tyron Garner were arrested for violating the Texas sodomy law, when police were called to Lawrence's Houston home, by a neighbor who falsely reported a weapons disturbance. Lawrence and Garner moved to dismiss the charges, arguing that the law was unconstitutional.
The case made its way through the appeals process, and the federal Supreme Court agreed to take the case, known as Lawrence v. Texas, in 2002. On June 26, 2003, Associate Justice Anthony Kennedy issued the majority opinion, which stated that:
The petitioners [Lawrence and Garner] are entitled to respect for their private lives. The State cannot demean their existence or control their destiny by making their private sexual conduct a crime. Their right to liberty under the Due Process Clause gives them the full right to engage in their conduct without intervention of the government.The Court thus reversed the result of its 1986 opinion in a similar case, Bowers v. Hardwick. The Court decided that case by a vote of five to four, upholding the constitutionality of the Georgia sodomy law.
The only justice who switched sides between 1986 and 2003 was Sandra Day O'Connor. She was also the only one of the six justices voting to strike down the Texas law, who wrote a separate opinion. Her main point was:
I agree with the Court that Texas’ statute banning same-sex sodomy is unconstitutional. ... Rather than relying on the substantive component of the Fourteenth Amendment’s Due Process Clause, as the Court does, I base my conclusion on the Fourteenth Amendment’s Equal Protection Clause.
In other words, she didn't make a mistake in Bowers. She still repudiates the application of the due process (i.e., the right to privacy) argument to the sodomy-law issue. In Lawrence, she found a different basis for deciding the issue.
I recall wondering at the time whether her separate opinion was a face-saving gesture. Had she actually just changed her mind on the issue, but didn't want to say so? The issue would not only have been saving face for herself personally, but also for the institution.
As I wrote here, the courts operate under the doctrine of stare decisis. They follow past precedents. But, for the Supreme Court at least, that's not an ironclad rule. The Court can overrule a precedent, but it needs to be careful about how it goes about doing so.
The danger is that the Court might be perceived as just another political branch of the federal government, along with the legislative and executive branches. A Democratic president can overrule decisions of a Republican predecessor, as President Obama has done on some issues. But the Court would lose legitimacy, if it were perceived as acting in a similar manner.
It's OK for a justice such as O'Connor to say, in effect, I agree with the line of legal reasoning I've cited in Lawrence, but not the reasoning of the dissent in Bowers. But, if she says, I changed my mind, and I no longer think that sodomy laws are acceptable, she's become legislator-for-life, with all of the implications that that entails for democracy.
In dissent, Associate Justice Antonin Scalia went, in my biased opinion, a bit over the top:
State laws against bigamy, same-sex marriage, adult incest, prostitution, masturbation, adultery, fornication, bestiality, and obscenity are likewise sustainable only in light of Bowers’ validation of laws based on moral choices. Every single one of these laws is called into question by today’s decision; the Court makes no effort to cabin the scope of its decision to exclude them from its holding.
Silly me. I didn't even know masturbation was illegal.