First things first: Mummification isn't exclusive to Egypt. The oldest known mummies actually hail from Chile, and some people in Papua New Guinea still practice their own form of mummification. But, for the purpose of this article, we're going to focus on how the ancient Egyptians approached embalming.
According to the Smithsonian, the entire mummification process would last 70 days from start to finish. To begin, priests would remove all of the internal organs and store them in special jars and boxes that would be buried alongside the body (and, yes, they really did remove the brain through the nose, per 1999's rendition of The Mummy). Then, the priests would extract any remaining moisture from the body using what was essentially salt. Only once the body was totally dry (and basically empty) would they start wrapping it up. Using yards upon yards of linen, the priests would wrap the body's appendages separately, layering protective amulets and jewels within the linen as they went.
(The British Museum, which is known for its extensive collection of mummies, actually has an illustrated step-by-step guide to wrapping a mummy — in case you want your next Halloween costume to be super accurate.)
So why did the ancient Egyptians go through all this trouble for a dead body? It all comes back to faith. At the time, people believed that they needed their bodies to carry their spirits into the afterlife, according to The British Museum. Making sure a body was well-preserved meant a spirit's vessel would stay completely intact. That's why it was so important to remove anything from the body that would rapidly decay or speed along the body's decay (like organs and any excess moisture).
Unfortunately, in The Mummy films they do gloss over the more spiritual details of the process of mummification. Of course, showing what 70 days of in-depth embalming looks like is probably a lot to ask of a two-hour action movie.