its considered a success if people are able to survive it safely. I haven't dealt with earthquakes to know the protocol, stay inside and shelter in place, or get outside. But with fires an apartment building could burn down, but as long as residents were able to escape, and fire rescue could work, in a timely and relatively safe manner its considered a success regardless of what happens to the building.
there is a still a review, maybe a lawsuit, and things are checked. but its a lot easier if no one was hurt. At some point its impossible to build an "X-proof" building. You get anything hot enough, it will burn. you shake anything enough, it will eventually break. at some point the code/design team/owner/city are saying its "safe enough", not that its totally safe.
in your case with the falling debris, that would be considered a failure if someone was hurt getting out, but the building still stood.