It's not just the buildings themselves but the ground they're built on. Many areas in the Bay Area are built on land fill (like areas of SF) or bay bottom soils. When a big earthquake hits, this kind of soil liquifies, amplifying the motions caused by the quake, destroying anything build on top of it if not anchored into bedrock.