Why do shallow earthquakes cause more destruction than deep ones?

Even if two earthquakes have the same magnitude, their depths can make a big difference in how much damage they cause.