Oh, I'm pretty sure these "random reasons" aren't the real reasons. The real reasons include wanting to keep inflated property values and city-level xenophobia (especially if new transit or housing let "those people" into their bubbles).
In a state like California, there are a multitude of reasons including those I noted, but you're definitely not wrong as to part of the reasoning. That doesn't change what I think should be the solution, at least in large part. The state needs to obliterate all local obstacles to new and affordable housing developments. If the Democratic Party cannot support affordable housing for all, we are failing.
A one-bedroom apartment in San Francisco now costs over $3200-3400/month. Housing all across the state is rising fast with no sign of slowing. California is at the epicentre of a full housing crisis and one that is mostly indiscriminately harming all but the richest amongst us.