In California, the picture is incomplete unless you include the effects of proposition 13. It has been in effect since 1978 and strongly encourages municipalities to prioritize commercial real estate over residential. Commercial real estate provides a tax base that can be increased over time with the value of the property, and does not represent as large of an infrastructure investment (residential requires schools and so on).
It isn't only prop 13 that is to blame for the bay areas particular housing crisis, but encouraging towns to not approve residential starts cannot help.