They were also people who could afford the expense to have their bodies preserved for the afterlife, which was mostly the elites, nobles, officials, and pharaohs.
Egyptians believed that when a person dies, they begin their journey to another world to live a new life. They also believed that a good afterlife involves putting treasures and different objects in tombs. The poor were buried in sand, the wealthy were buried in tombs, and some pharaohs were buried in pyramids.
There was also an embalming process which was also called mummification. The process involves taking all the moisture out of the body so that it wouldn't decay.
Before mummification, Egyptians used to be buried