Habitual group activities are prevalent across many animal species, particularly in mammals, especially in primates.
However, I do not see any evolutionary benefit of this. 'Ceremonies' take time, and in many cases seem to exert more energy than they reap. Note at this point I am not talking about hunting groups, but rather about group activities that serve a purely social purpose (mourning is a good example of this and is present in elephants, chimpanzees, bonobos, and probably more). This costs significant amounts of resources, time, and energy which apparently could be better spent hunting, foraging, traveling, mating, or grazing.
I'm interested in finding a timeline, and explanation, of why and how this phenomenon of higher social rituals (perhaps using mourning as an example) evolved throughout the mammalian kingdom.
A cursory google revealed nothing about how this 'liking' of interaction evolved.