People did not live long in medieval Europe. Food was scarce, hygiene was poor and the plague was rife. Skulls were used as symbols to remind people how short life was.
A fine funeral was a way of remembering a person, as well as helping them into the next world. Nearly everyone believed in life after death. For the majority who were Christians, this was Heaven, where you could only go if you had lived a good life.