because that's how most ancient Egyptians bulit tombs for their pharaohs and here is so more information from Google
Pyramids were built for religious purposes. The Egyptians were one of the first civilizations to believe in an afterlife. They believed that a second self called the ka lived within every human being. ... Three pyramids were built at Giza, and many smaller pyramids were constructed around the Nile Valley
more information if that doesn't help
Egypt's pharaohs expected to become gods in the afterlife. To prepare for the next world they erected temples to the gods and massive pyramid tombs for themselves—filled with all the things each ruler would need to guide and sustain himself in the next world.