The pyramids were extraordinary monuments, but they also came to serve a vital purpose in getting the pharaohs to the heavens.
Before the pyramids, tombs were carved into bedrock and flat-roofed buildings were used to cover them. These were called mastabas. Soil mounds often covered the mastabas. This may have been the inspiration for the pyramids.