The US is not a direct democracy. It is a Constitutional Republic. We have a representative, not direct rule, form of government. "The People" are not required, or allowed in most cases, to vote directly, especially on matters affecting minority groups.
The Constitution lays out the terms of this Republic. Part of the genius of this document is its careful consideration of rules and policies that protect all the citizens. The Constitution provides the protections necessary so that all the people consent to be governed. The courts enforce these Constitutional protections.
Without a constitution, a simple majority could deprive any minority group of its rights. A simple majority could decide that blacks and whites should be segregated, that mixed-race marriages are illegal, that Jews have no right to practice their religion, that women aren't allowed to vote, that Hispanics have to carry special identity documents. Or that GLBT people cannot marry.
Over and over again, our Supreme Court exercises its role of comparing laws to the Constitution and ensuring that all people have equal protection. They don't always get it right, but over time, we can see a clear arc of justice. The Constitution opposes simple majority votes: the tyranny of the majority, or mob rule.
You can bet that the majority of voters in the south opposed school desegregation and the dismantling of Jim Crow in Brown v Board of Education. It is a fact that the majority of Americans opposed mixed race marriages, for decades after Loving v. Virginia.
Polls suggest a majority of Arizonans approve the state's draconian "breathing while brown" anti-immigrant law. That doesn't make racial profiling legal.
And that a majority of Californians decided to take away the rights of GLBT citizens doesn't make it right, or Constitutional. I wish the advocates of mob rule would get a civics book and learn what the Constitution is all about.