Ancient Egyptians believed in an afterlife, a real and beautiful place, where they played and lived after they died. To enjoy your afterlife, you couldn't just die. You had to prepare. To achieve immortality, you had to satisfy some requirements.
(1) Your name had to be written down. You had to have your name written down somewhere, the more places the better. If it was not written down, you disappeared.
(2) You had to pass the Weighing of the Heart. You had to pass the weighing of the heart test in the Hall of Maat. Your heart was weighed against the weigh of a magic feather. If your heart was light, because you had lived a good, hard working, caring life, the scale would balance, and you would go to heaven. If it did not, well, that was another story.
(3) You had to have a preserved body. Another thing you needed to move on to the afterlife was a preserved body. One way to preserve the body of a person who had died was to dry them out and wrap them up with linen bandages. That process was called mummification.
You needed a preserved body so that your Ba and Ka, the two pieces of your soul, could find their way home at night back to your tomb. Without a body, the Ba and Ka would get lost. And they would no longer be able to reach the heavenly Land of Two Fields.
The poor placed the bodies of their dead relatives out in the desert sand. The bodies dried naturally in the sun. That was a perfectly good system. It assured the dead a place in the afterlife (provided their heart was light from doing lots of good deeds while they were alive, and their name was written down somewhere.) If they had a light heart, they would pass through the field of reeds and reach their afterlife. (The field of reeds is what the ancient Egyptians called death.)
The rich could afford to be more fussy. They hired professional mummy makers, to help them look their very best.