Ancient Egyptian pharaohs, like Mayan lords, built pyramids because they’re a pretty easy shape to build. Pyramids are especially easy to build if they are mostly solid piles of dirt or stone. Check out how easy it is to build a pyramid for yourself next time you go to the beach, or a playground with a sandbox. Get the sand a little damp (not too wet). Then try packing it into the shape of a pyramid. Do you at first get a step pyramid or a bent pyramid, as the Egyptians did?
Keep trying! Can you get your sand into a nice straight pyramid after some practice? Why or why not?
More about Egyptian pyramids
Or about pyramids in Sudan
More about Mesopotamian ziggurats
Or about South American pyramids
Geometry of Pyramids
Pyramid, by David Macaulay (1982). His architectural drawings are great, and his explanations are simple and clear. Easy reading.
Eyewitness: Pyramid, by James Putnam (2000). Easy reading. Good photographs.
The Art and Architecture of Ancient Egypt (Yale University Press Pelican History of Art), by William Stevenson Smith and William Kelly Simpson (revised edition 1999). Standard college textbook.