A funeral is not a service or single event. It is a series of events that occur over time following a death.
Archeologists have found evidence that mankind has faced death with events, rituals, and customs for over 60,000 years. In fact, across time and culture, one constant is the basic human need to mourn the loss of someone close to us or a member of our community.
The specific events, rituals, and customs may vary across time and culture, but the basic components are very similar. Talking about the components, similarities, or differences encompasses entire college courses of study. No matter the specifics, there are basically two things that mankind has tried to address through the development of custom and ritual.
The first is to gather the people you care about at the time of a death. It is by supporting each other, grieving together, and sharing memories that we begin to adjust to a loss and begin the mourning process.
The second thing that mankind attempts with the funeral is to keep the person who has died close to us. If you examine rites, rituals, visitations, vigils, cemeteries, the pyramids, and many other things, they exist to keep those who have died close to us. In Victorian times, there were lockets designed to carry a lock of hair of departed relatives. There are many examples of our attempt to keep a person physically near or spiritually present.
Funeral rites, funeral ceremonies, memorial services, and celebration of life services are all examples of parts of a funeral, but not the entire funeral.