At the dawn of history, mankind decided to move from tents (very good in earthquakes), to more comfortable structures. For most people the convenient construction material was stone. Nearly all of the stone construction was a variation on the theme of Stonehenge - take two vertical stones, and place a flat stone on top.
Of course, not everybody had the big rocks, so they would approximate this by piling rubble, or bricks, and by constructing arches.
This form of construction had the appearance of stability and protection from the rain, but came with a serious disadvantage. Should an earthquake swing the ground, there was no lateral resistance, and the big heavy roof stone fell on your head.
Unfortunately, this has been going on for thousands of years. Earthquakes may only happen at any given spot every couple of hundred years, and slapping up something with stone is quick and easy. The only modern variation is that concrete is now used, but usually put up with the same lack of concern to lateral forces.
Good earthquake construction pays careful heed to lateral forces. Proper concrete construction involves steel reinforcing bar (rebar), lots of it. All the joins (where beams meet the columns), are carefully tied in with rebar. The concrete is of very high quality, and high strength. You do not used brick infill for the walls.
Most countries have a building code that specifies lateral strength. It's sometimes a question of whether these codes are enforced. As we have seen too many times, the consequence of having something heavy fall on your head is not something we may wish to consider.