Single family zoning as far as the eye can see. San Francisco simply cannot grow due to the stupidly restrictive zoning. Combine that with prop 13 limits on property tax based on purchase price rather than market price of the property, you got a bunch of land horders who are not pressured to better utilize the limited space that we have as a city.
In turn, this makes rent stupid expensive, and the housing stock really bad for renters.