> For example, California government passed AB-5, and then later popular ballot passed prop 22, which essentially goes contrary to AB-5. Does that suggest that leadership is out of touch with the electorate?

The idea of representative government is you outsource decision making to people, not that you hire people to always do what the majority wants. That is the justification for a ballot initiative override. Not necessarily saying that ballot overrides of legislative actions are good structure -- there are pros and cons. But in the case of AB-5, that was clearly an out-of-touch legislative body taking some very extreme measures that were more radical than the state population wanted. That is a common thing when you have one-party states like CA, so in the current CA landscape ballot initiatives are a good safety check on what is a one party legislature controlled by party insiders.

> If you think in terms of a software engineering organization, it would seem crazy to take bug reports and just blindly do whatever the tickets with largest number of CAPS LOCK words says. But governments often do exactly that

In my experience in the corporate world, working from everything from non-profits to start ups to DJIA member companies, I find corporate decision making to be equally random and opaque. They are just random in different ways. In the corporate world, if you can find an executive sponsor and frame something the right way, you can convince them to follow a road of sheer madness. In government, if you can convince a politician that something is trendy or a cheap way of getting votes, they will commit huge blunders. If you can convince them that something is a moral imperative, they will commit unspeakable atrocities.

> This is also true, and it's definitely a touchy subject. On one hand, global consensus seems "fairest", but is it really the fairest if the vast majority of people are not affected by a decision (or they are affected to different degrees depending on various factors)?

Indeed a tough subject. The way I think about is this. If you are in the business world and you are leading a team of 5 engineers, who are trying to make a decision. Let's say 3 strongly believe in A. 2 Strongly believe in B and are strongly opposed to A. Do you say "majority rules"? Unlikely. You will try to find consensus. Consensus could be something like 60%A and 40%B. This consensus gathering process is why businesses often do crazy things, but they don't know a better way as pissing off 40% of your team is something you need to avoid. The 2 people can quit -- they can transfer to another team. So ultimately you do need to gather consensus rather than search for 50% +1 in making decisions within a team.

But a society is like that team. It requires more than 50% +1, otherwise you will find groups seceeding. One way of addressing this is to put in various roadblocks to require more than 50%. Say you need 2/3. Then people have to negotiate. If you want to do something 1/3 hates, then you can do it if you give them something in return. You bargain and you reach a consensus where everyone gets some of what they want, even if they don't like it. But then you might reach a situation where the society is split and simply can't come to a consensus because there are moral issues at stake that they are not willing to compromise on. Then your option is federalism. You break the society up into two groups and let each one make rules for themselves. Within each federalist group you have the super majority requirement again, but because they have shared values, they can reach that super majority.

All of this stuff was debated long ago in 18th-19th C France and England, and many very smart people looked at all these issues, which is why we have this weird federalist form of government in the US where you have both a senate and a house and it's really hard to get anything passed into law unless you have both a geographic and population supermajority on your side. But as the nation splits into two camps that view each other as basically evil, unreedemable, hopelessly foolish people, you are finding more and more gridlock and more and more appeals to Federalism. California wants to run their own climate policy? Fine, let them. Oklahoma wants fracking and free gasoline to everyone? Fine, let them. If you don't, the days of the republic are numbered.