Everyone knows that the Egyptians went to somewhat extreme lengths to ensure their continued life after death. They built huge tombs, hoarded wealth, and performed elaborate rituals and preparations on their bodies after death. It all makes for very interesting cultural history, but it all reflects back on their religion, beliefs and mythology.
The practice of mummification was based on one of the myths of Osiris and his brother Set.
Osiris was the beloved God of fertility and agriculture. He was so well-loved that his brother Set became jealous and decided to kill Osiris so that he could take his place. Set first tricked Osiris into a large chest, which he then sealed and threw into the Nile. Isis found Osiris’ body, but Set fell on them once more and cut Osiris into 14 pieces, which he then scattered around the lands of Egypt.
Isis did not give up and searched for all 14 pieces. When she had found them all, she wrapped them up in a linen sheet. She asked Anubis for help, and he resurrected Osiris. But once resurrected, Osiris was unable to return to the land of the living, and became the God of the Underworld.
So the Egyptians saw the wrapping of Osiris in linen as the part of the process that leads to continued existence in the afterlife. His body was cut into pieces, so they removed the organs of the dead but preserved them so that that all the ‘pieces’ were not lost.
One other aspect of the myth that may have played a part in the their rituals was the chest Set used to trap Osiris. The large and elaborate sarcophagus that was commonly used could have been inspired by that chest.