The bill was voted in by the majority not by the minority. That is the way it works in a democracy.
The government of the United States is not a democracy. It never was and was never intended to be. It is a constitutional federation organized as a democratic republic. The two important words in that phrase are republic -- leaders are elected because of their principles, and when those principles clash with "the will of the majority, they are expected to vote their consciences, and not be swayed by the fickle whims of the mob -- and constitutional -- the Constitution comes before all else. When leaders are sworn into office, their oath is to serve and protect the Constitution.
That is my beef when a court disregards the will of the people in favor of an agenda.
No, the courts "disregard" the will of the people in favor of the Constitution -- the contract that the people signed with the government giving the government its power. Any law that ignores that contract, no matter how popular, is invalid. The contract (the Constitution) can be re-negotiated (amended), but it is not easy to do so, and that is deliberate.
Both that it is possible to amend the Constitution, and difficult to do so reflect the sentiment of the Founding Fathers that Democracy is the worst form of government -- except for all the others. They saw that all men, whether singly, in small groups, of in the collective, are venal and petty. They did not want a dictatorship, or an aristocratic oligarchy, nor did they want mob rule. The "tyranny of the mob" can be just as cruel and unjust as the tyranny of the autocrat.
It is easy enough to agree to principles as long as they are abstract, but once they become applied to individual situations, the NIMBY principle (or its reverse -- the pork barrel) and other selfish and petty concerns start clouding the issue. If the Constitution could be easily changed every time a politician proposed a tax change, or a highway, it would be worthless, and we would indeed be at the mercy of anyone who could accumulate a majority vote, whether by common goals, by bribery, or by force. By requiring that any government action must follow the Constitution, we can curb at least some of those excesses.