Natural selection favoured a rather small and inconspicuous group of mammals who would survive by working co-operatively in small groups.
These groups needed to communicate in order to work together.
The better they were able to communicate – the better their chance of survival.
As that ability to communicate developed so did the mammals need to express the need to be part of community – to embed the understanding that the individual was necessarily part of something that transcended its own individual survival
That transcendent other is expressed in religious terms
Anthony John Sargeant