To add to jjoonathan's point, I'll share an interesting observation about the Bay Area housing market:
The Bay Area has a number of little-known unincorporated enclaves that are often located within incorporated cities. Places like Devonshire (San Carlos), Emerald Hills (Redwood City), the unincorporated strip of San Carlos Ave (San Jose), Ladera or Los Trancos Woods (Portola Valley), Castro Valley and San Lorenzo (Hayward/Oakland). I've noticed that in today's hot market, houses in those areas consistently go for anything for $0-150K under asking, while houses in the nearby cities go for $150-500K over asking. A typical swing in purchase price for equivalent homes in nearly equivalent locations is about $300K (on prices of about $1.8-2.2M).
The usual real-estate confounders don't apply here because the geographic locations are so similar. The fire danger is roughly equivalent (but high): places like Devonshire and Emerald Hills are inside of 280, and right next door to equally flammable but more expensive houses in Belmont, San Carlos, and Redwood City. Commute times are basically identical, if anything a little shorter. There's less regulation for building, but not much more additional supply of land since these are constrained enclaves.
It seems like buyers are willing to pay a premium specifically to get city services and city regulation. Instead of the free market being impeded, this is the free market speaking: buyers are paying a premium to live in areas where there are more services and more regulation.