Where parts of San Francisco are jammed with houses, every nook occupied, not unlike parts of Manhattan or Boston, there are large swaths of the Valley with nothing but parking lots.
San Francisco is not unique in this regard. Every urban area in America is like this, including Boston and NYC.
San Francisco has a number very tall buildings with a few even built on the side of a literal mountain, and all of these have survived several significant quakes, so I doubt this is the actual reason.
The buildings on the hills are the ones that survive the quake. The buildings built on sand, like in the Marina or Mission Bay, are the ones that are vulnerable to earthquakes.
You say "every" urban area, but I've been to enough American cities to know this isn't true.
Phoenix? Cleveland? Kansas City? Denver?
They're parking lots with buildings sprinkled here and there. Density isn't even a priority. Land values are too low to promote higher density.
A lot of this has to do with the fact that Boston, Manhattan, and San Francisco are geographically constrained, they're hemmed in by water. Chicago is like this to a degree, but has sprawled enough that it's irrelevant for the most-part.
It is shocking how many cities view their landscape as worthless, paving it over instead of constructing something that contributes to the betterment of the city. Though when cars rule, concessions must be made. Nobody seems to care about the people who live and work in a city.
I cannot pimp John McPhee's Assembling California [1] highly enough. It is fantastic, and contains a wonderful section about the '89 quake. Really, anything John McPhee writes is worth stopping whatever one is doing and getting started. He's a national treasure.
It's not that hills don't shake, it's just that your house has a better chance of staying up if the foundations are laid in bedrock, and most hills in SF are close to the bedrock.
San Francisco is not unique in this regard. Every urban area in America is like this, including Boston and NYC.
San Francisco has a number very tall buildings with a few even built on the side of a literal mountain, and all of these have survived several significant quakes, so I doubt this is the actual reason.
The buildings on the hills are the ones that survive the quake. The buildings built on sand, like in the Marina or Mission Bay, are the ones that are vulnerable to earthquakes.