Answer :

The great pyramids were built as tombs for pharaoh, there was a mini hole to the outside of the pyramid so that the pharaoh a soul can join Ra the sun god. Occasionally if a slave was very loyal to the pharaoh they could be buried with the pharaoh as an honor