Lack of space (SF is quite small) + Tech boon = most expensive city in the world
There's lots of space for infill housing. There are MANY one and two story buildings within a stone's throw of a train line.
The people really suffering are the ones on the low end of the pay scale that either commute multiple hours of their day or spend half their income on rent.