As others have said, mostly luck and survivorship bias.
In particular, there are some ancient buildings that are made of particularly tough materials. That basically means rock.
Once you cut a rock into some shape it takes a long time for that shape to change from just natural erosion. Giant piles of rocks don’t tend to move around much either.
So the Pyramids at Giza, Stonehenge, the Great Wall, etc. have some pieces crack off and get a little weathered around the edges. All the structures made of things like wood, straw, skins, etc rotted away centuries ago.
Latest Answers