The Alaska Court of Appeals upholds the right to privacy against the legislature's desire to make it a crime to possess small amounts of pot in one's home.
The Florida legislature passes a law, and Governor Bush signs it, that runs counter to the court's ruling that a brain-damaged woman in a vegetative state has the right to die.
The US government passes a law against partial-birth abortion and it's immediately put on hold by three separate court rulings.
The Massachusetts Supreme Court rules that the state has no legal reason to deny gays the same right to marry that straights have.
The Alaska and Hawaii Supreme Courts rule that these states have no constitutional reason to deny gays the right to marry. In each case, the legislature rushes to add a constitutional amendment defining gays out of marriage, thus giving the state a constitutional reason to discriminate against gays in terms of marriage rights.
The Alabama Supreme Court tells Chief Justice Roy Moore to take his monument to the Ten Commandments out of his courthouse, and the Supreme Court won't hear his appeal.
The Ninth Circuit Court of Appeals rules that leading public schoolchildren in the Pledge of Allegiance (the Pledge of Allegiance!) is unconstitutional. The Supreme Court dodges the appeal on a technicality.
Or go all the way back to Roe v. Wade, when the US Supreme Court overturned laws criminalizing abortion, against the earnest wishes of state legislatures across the country. And before that, the rulings in the 60s banning laws against contraceptives.
Why is it that courts are all the time handing down these startling rulings that overturn popular laws? Because courts stand up for our ideals. And it's the very nature of ideals that they contradict our everyday practice.
What citizens want are high-minded ideals, plus the privilege to contradict those ideals when they protect people we don't like. Treat people equally? Sure, except the faggots, the infidels, the sluts, the whores, the pot-heads, and the polygamists. Promote liberty? Sure, except the liberty to suck another man's (or another woman's) genitals, get an abortion, buy or sell sexual favors, smoke out on weed, commit suicide, or marry multiple spouses. Respect privacy? Sure, except the right to do privately what voters don't want you to do.
Elected politicians are beholden to the citizenry. They're either happy to give the citizens the power they want over their neighbors' private lives, or they're afraid to deny the citizens what they want, or (such as in the case Rick Santorum) they're happy to use their power to enforce their own moral codes. Elected officials violate our ideals because the people who vote for them want them to, and because they want to themselves.
What the courts do, on the other hand, is hold us accountable for our own ideals. That's why so many people hate the courts. Courts favor the high-minded principles that people can put down on paper when they think in terms of liberty, equality, and personal sovereignty. They don't favor the hatreds and prejudices that people express when they try to put their neighbors in their places. Thank God for the US courts.
Or, if you don't like that explanation, here's a more neutral one. The legislature expresses the will of the majority. The courts defend the rights of the minority. In this sense, thwarting the will of the majority is what the courts are there for, when the will of the majority is sufficiently at odds with the rights of the minority.
Now if that doesn't work for you, here's a third explanation. The courts are like literal-minded and inflexible robots, acting on general programming that can't possibly account for individual exceptions. When writing a federal or state constitution, human beings aren't able to spell out every detail. Naturally, they write in generalities. Invariably, these generalities lead to missteps when taken literally and applied without common sense or a respect for consensus morality.
But if you're really ticked off at the courts, we can go further. The courts have been given the power to thwart the majority when it's called for. As human beings, the judges are naturally tempted by power. The way they exercise their power is to overrule laws that people like, and the more people like a law, the more power a judge exercises in overturning it. Accountability that elected officials have in a democracy doesn't extend to judges, and they've taken to throwing their weight around just for the sheer pleasure of doing so.
Personally, I'm with explanation number one.
Law and Morality: subjective and objective injunctions
Were the Liberals Right?: 20th century progress
Supreme Court Rulings