RIDGECREST, Calif. – After powerful back-to-back magnitude 6.4 and 7.1 earthquakes struck this city, the management of Kristy's Family Restaurant summed up the damage: a tub of butter fell on the floor.

That was it.

"I'm surprised nothing happened," said the diner's owner, Hani Kamani, over the din of a busy Sunday breakfast crowd.

This desert city of about 27,000 appeared to have escaped the quakes largely unscathed when it comes to structural damage, city officials said. There were no deaths or major injuries reported and only four building fires, likely sparked by ruptured natural gas or electrical lines.

Stores were cluttered with fallen items on the floors. But many, even a Walmart that earlier news reports said had been hit hard, called in overnight cleanup crews that allowed them to quickly reopen. At the Eastridge Market, the mini-mart was doing a brisk business despite aisles awash in a sticky stew of liquor and broken glass from a cascade of bottles that the quake sent cascading to the floor.

By contrast, the San Francisco Bay and greater Los Angeles areas have experienced significant damage following quakes over the past century of lesser intensity.

The 1989 Loma Prieta earthquake, a 6.9-magnitude temblor, killed 63 and caused buildings and freeways to collapse in San Francisco, Oakland and surrounding areas. The 6.7-magnitude 1994 shaker in Northridge, a Los Angeles suburb, is blamed for at least 57 deaths and $25 billion in damage, including many collapsed structures or buildings knocked off their foundations.

'Scared to death':7.1 earthquake follows 6.4, leaving Ridgecrest residents fearful, resilient

So, why not Ridgecrest?

Sure, a more detailed damage assessment was ongoing in the city about 170 miles north of Los Angeles. And Trona, a tiny factory town about 30 miles to the east Ridgecrest with many older buildings, took a harder hit.

But to some, Ridgecrest's seemingly lucky break was viewed with a nod to divine intervention – "a blessing and a miracle," said Dionsio Mitchell, a battalion chief for the Kern County Fire Department, which protects the city.

Mayor Peggy Breeden, who has lived in Ridgecrest since 1983, takes a more pragmatic view. She points out that most of the buildings in the city were constructed from the 1970s onward, when the state and architects alike became more aware of earthquake safety and incorporated into law, design and materials.

Just as significantly, Breeden said it's common for contractors to encounter caliche, a layer of calcium carbonate-bound rock that is especially difficult to break apart.

Building on rock, not sand, can make a big difference when it comes to building safety, experts say.

The degree of damage "depends not only how big the earthquake is, but rock or soil. In Los Angeles, we expect stronger shaking because it is soft sediment," said Lingsen Meng, an associate professor of geophysics at UCLA. "If you were standing on bedrock ... the shaking will be reduced."

'I hope this is not the end':Trona, California, was trying to bounce back. Then an earthquake hit. Then a bigger one.

And John Ebel, a professor in the earth and environmental sciences department at Boston College, added that parts of Los Angeles are built on soft soil from ancient riverbed, making them more susceptible to shaking.

As for Ridgecrest, Ebel, who just authored a book on earthquakes in New England, said: "I am not surprised the town did so well," crediting stronger, modern building codes. "Any building that was about 20 years old should have done pretty well in the earthquake" if built to code.

Ridgecrest officials have been searching for answers to the town's good fortune, without success.

"We've asked other experts the same thing...and they are like, "Uh, someone is looking over you guys because we don't know, either,'" said Police Chief Jed McLaughlin.