In the Loma Prieta quake in 89, some areas suffered no damage, while some areas miles from the epicenter suffered major damage. Factors included building (and structure) construction methods, and underlying soil types.
The Marina district of San Francisco, about 40 miles from the epicenter, suffered major damage due to soil liquifaction (much of the area was built on landfill..).
The Cypress structure on I-880 collapsed due to lack of rebar wraps within the support columns (there was plenty of vertical rebar, but nothing to keep the concrete from blowing out the column sides during a major quake.)
Well constructed wood framed housing tended to fair well due to the
flexibility of the structure, while non-reinforced brick tended to perform poorly.
There were a number of mobile homes that probably would have survived, had they not slid off their foundations.
In the Northridge quake in 1991, there were a number of apartment buildings that collapsed due to lack of shearwalls on the lower levels (they were built over garage/carport areas.. )