Q: Was religion an evolutionary advantage?
Before society developed and codified it, religion existed (in a metaphorical sense) for millions of years. The mammals that learned to live in strict hierarchies were the ones most likely to survive. Even in the primitive world, multiple minds worked better than one. And from an evolutionary perspective, the only thing that really matters is survival.