That act of communal mourning can also serve to reinforce social bonds among the living members of the group, at least in my estimation. I recently held a memorial service for my father (shakes fist at Parkinson's) but the thing that struck me was the younger members of our extended family experiencing some of that shared bond between the older ones, perhaps learning to appreciate their family members more. They hadn't known my father as brother or uncle but their parents and grandparents had.
A sense of belonging to something a bit larger than the individual experience... I have no scientific evidence to support these suppositions but it seems they must be real, to me.
Also, when we gather to share stories of a person's life (and circumstances of their death), we can gain valuable insights and motivation to help us live a good and long life ourselves.
Or what behaviors to avoid lest you be the next victim?