Democracy is mob rule. The U.S. is not a democracy.
If we were a democracy, this ruling may have ostensibly been the wrong decision if the majority of people were in favor of singling out gay people for prosecution under sodomy laws.
But since we're not a democracy, this ruling correctly protects the rights of a minority from the tyranny of the majority (read: mob).
Name for me one part of the Constitution that was not voted on.