Why does the Tower of Pisa lean?

The Tower of Pisa in Italy has been leaning sideways for over 800 years. It looks like it's about to fall over, but it never does. Tourists from all over the world come to take goofy photos pretending to hold it up. But why does it lean in the first place? The answer is hiding right under the tower — literally under it, in the ground.
When builders started constructing the tower in 1173, they thought they'd picked a perfectly good spot. The ground looked solid. The grass was green. Everything seemed fine. They laid a stone foundation only three meters deep — not very deep for an eight-story tower — and started stacking up heavy marble rings, floor by floor.
