I have often made the argument that religiosity, a personal belief in god, spirits, the supernatural, etc., would emerge in human societies on its own if it wasn't there already.
Imagine taking an entire generation of people in a geographically isolated region, and wiping out their memory of religion, and also, removing all references to religion that they might ever encounter. They would be religion free for a while, maybe even for a number of generations, but eventually, they would reinvent it.
Everybody has a theory of why religion exists, what purposes it serves, etc. etc. Until proven…