The ancient Egyptians believed that after the person died, his soul would then return to the same body so they needed to keep the body from rotting. Mummification was a process that kept the dead bodies from rotting, which is usually what happens to corpses.
Moses was the one who introduces the 10 commandments. By then on, it was already established that the commandments will be the guiding rule of the followers