I heard this the other day and thought it was interesting.
Is Believing In God Evolutionarily Advantageous?
These supernatural agents, Bering adds, might have very different names. What some call God, others call Karma. There are literally thousands of names, but according to Bering they all have the same effect.
"Whether it's a dead ancestor or God, whatever supernatural agent it is, if you think they're watching you, your behavior is going to be affected," he says.
.......
Why would the human brain have evolved to work in that way?
For Bering, and some of his friends, the answer to that question has everything to do with what he discovered in his lab — the way the kids and adults stopped cheating as soon as they thought a supernatural being might be watching them. Through the lens of evolution then, a belief in God serves a very important purpose: Religious belief set us on the path to modern life by stopping cheaters and promoting the social good.