For those who haven't studied economics:
When you restrict the supply of something scarce or the demand for it goes up, the price increases.
In this case the "something" is housing. It's essentially illegal to build anything in the bay area which means the supply isn't changing much. But the demand is skyrocketing. Therefore the price is skyrocketing.
This would all be fixed very quickly if it was legal to buy some land, demolish what's on there, and build a skyscraper instead. San Francisco would look like Manhattan within two years.
If you study the 1906 earthquake, you find that a lot of people suddenly didn't have homes. They were all rehoused within a couple of weeks. Today, being illegal to build anything, and with rent controls on what does exist, we'd have a lot of homeless people for a long time.
We all want everyone to have a nice life, and we intend well with these laws. Economics concerns itself with what actually happens when you incent people though, not what we intend by those incentives.