@ZH it'd take me several pages to answer your question properly so just to give you an idea:
- Building in California is very expensive (building codes, higher energy efficiency, high government fees, very high labor costs, etc.)
- The state has complex environmental laws and tax structures.
- A lot of opposition to new development by existing residents (more houses>more cars>more traffic>longer commutes and also more pressure and wear and tear on the infrastructure).
- Land cost is very high and developers tend to build fewer houses at premium prices that only the affluent can afford.
- Fewer people can afford to buy (most of the workforce in CA does not earn Silicon Valley salaries yet an entry-level home with a reasonable commute goes for well above $500,000). And those who cannot buy also have trouble finding affordable places to rent...
It's a big problem and it doesn't seem like it's going to get better any time soon.