Maybe if the Taliban hadn't scared away all the international aid, more of those buildings would have been reinforced or replaced with structures capable of surviving earthquakes. Either way, we all know earthquakes are the will of Allah, so clearly this is a punishment for the immorality of the Afghan people.
Or, if they hadn't been preoccupied with building this: Simurgh's legacy: Afghanistan's supercar marvel Don't bother watching the video on the car, you still can't see it any better than that.