1-To preserve the kings body and make sure that the dead pharaoh will be moved safely from this life to the next. 2- It was the place where the process of mummification used to take place.
Mummification is the process of preserving the body of the pharaoh to prepare him for the next life.
Its a complicated process which used to take 70 days. It depends on dehydrating the body and to get rid of moisture, palming the body and wrapping with strips of linen and finally putting it in stone coffin.
There are over 100 pyramids in Egypt, the most important are the Giza Pyramids. They were built to be tombs for the pharaohs.
It took many years and thousands of slaves died during the construction of this massive buildings.
Huge blocks of stones had to be brought. Then they had to put these one on the top of the other using sledges as some archaeologists mentioned. They built tunnels and chambers inside the pyramids. Finally, they smoothed off the sides and the pyramid had to be finished.