I would've guessed "they ran out of stones," but structural engineer Peter James arrived at a very different answer when pondering why ancient Egyptians stopped building pyramids. Turns out, these pyramids were too perfect and that's the ironic basis for their structural instability:
So what was causing the crumbling? James presents a new explanation: thermal movement -- that is to say the expansion and contraction of the limestone with temperature fluctuations -- has ground down the rocks and shifted their positions.
He estimates that the motion can amount to 1¼ inches per 328 feet. As the stones move, dust and sand would fall from the stones and fill in the spaces between them. The spaces into which they could contract at night would shrink, and over time they would be pushed out of position. "Multiply this endless movement by the number of days that the pyramid has been erected and you have the reason why all the outer casing has moved to the extremities, where it has buckled or displaced against blocks moving in the opposite direction and then fallen off," James writes. "It may then have been picked up by opportunists and removed from the site.?"
Problem was, as ancient Egyptians became better at constructing pyramids, the voids between the stones disappeared and the structure were less able to withstand the thermal expansion and contraction of the limestone.
Rebecca J. Rosen of The Atlantic explains: Link