Good governance matters. It makes a huge difference in cost-of-living. The way SF is run, it's almost as though people want the cost-of-living to be as high as possible.
Surely you're joking? Of course that's what they want. SF people, home owners, are voting on SF policy. Do you want to lose half the value of your house?
Its more complex than that, as SF people voting on policy also include renters, and even if rent control insulates them from directly paying for price increases, market price declines save them money (and both increases and declines affect local costs of other goods, so they affect CoL even if they don't directly affect existing renters rent payments.) But, renters are largely people who have decided the trade-off of quality for cost at the current price does make sense, so they are less likely than outsiders who might want to move to SF if it was more affordable to make trade-offs that impact the qualities that they prefer in SF for lower prices, even if it would reduce their cost of living.
For example, you can get to midtown manhattan in half an hour on NJTransit from East Orange, NJ, a very cheap place to live. The NYC metro area is chock full of affordable neighborhoods where the tradeoff is merely having a commute, not a LOOONG commute.
Ideally, you have your infrastructure scale as the city grows, to maintain constant commute times for workers even as they move further out.
Even the tech hub was not on a peninsula, you'd still have an expensive center and poor people would have to suffer a long commute like East Bay people do in the Bay Area.
Just look at London or Paris: it's not cheap despite not having the same geographical problem. It's not as expensive as the Bay Area because there are many people with various jobs, not just highly paid tech workers.