Part of a mortician's job is to prepare a dead body to be viewed in a open casket. They apply makeup to try to make the dead person look as they did when alive.
The goal is to make the deceased appear peaceful as if they were asleep. Makeup is applied after the body has been embalmed. The embalming fluid makes the skin firm, so applying makeup is different than on a living person. Often an airbrush is used to distribute foundation evenly. The mortician sometimes works from a photograph of the deceased to help create a natural appearance for viewing.