Why was the Great Pyramid of Giza Built?

The pyramids were built as mortuary or burial buildings. They were built by workers, not slaves, as commissioned jobs. Khufu who commissioned them paid his workers well and took good care of them. You can find more information here: