This article in the New Scientist offers a psychological explanation for rituals like the Japanese tea ceremony, and religious rituals.
“Collective rituals are public signals that you are committed to the group, which facilitate co-operation with the group and create a sense of shared purpose.”
There is a description of an experiment in which children are copy ritualistic actions more accurately if they have previously been made to feel ostracised.
Another experiment compares two groups of children. One group worked together to make necklaces of beads based upon an invariant ritualised procedure: “first we add a green heart, then an orange square”, and so on. A control group simply made freestyle necklaces. After seven minutes the experimental group expressed greater feelings of affiliation and connection to their group than the controls.
“Children copy apparently aimless sequences of actions more faithfully than ones with a clear goal.”
New Scientist, No. 3004, 17th January 2015, p37-39.