You are wading into the complex web of how democracy works in the US. Denigrating the "elite" Supreme Court and ignoring all the other elites and distortions involved in any state legislation seems disingenuous.
The link only goes to 2015, but polling had already changed 15-18 points in favor of marriage equality by then. California had 48% vote against prop 8 in 2008, which was still ~8 points above the national level of support for same-sex marriage.
It's also worth noting that "super liberal" MA, which legalized same-sex marriage in 2004 via a state Supreme Court decision, failed multiple times in its legislature to ban it https://en.m.wikipedia.org/wiki/Same-sex_marriage_in_Massach... and multiple opponents of it were defeated in elections and replaced with proponents.