God may or may not exist, but His followers certainly do. Nearly every civilization worships some variety of supernatural power, which suggests that humans are hard-wired to believe in something that, by definition, is not of this world. But why? Evolutionarily speaking, how could belief in something in the absence of physical evidence have aided the survival of early Homo sapiens?

Evolutionary biologists Stephen Jay Gould and Richard Lewontin of Harvard University proposed that religious thinking is a side effect of tendencies that more concretely help humans to thrive. Perhaps the most primitive is our “agency detector,” the ability to infer the presence of others. If the grass rustles in the distance, our first instinct is that someone or something may be lurking. This propensity has obvious evolutionary advantages: if we are right, we have just alerted ourselves to a nearby predator. (And if we are wrong, no harm done and we can get back to picking berries.)

In addition, humans instinctually construct narratives to make sense of what may be a disconnected jumble of events. Nassim Nicholas Taleb, author of The Black Swan and a professor of risk engineering, calls this the “narrative fallacy”—we invent cause-and-effect stories to explain the world around us even if chance has dictated our circumstances. Gods, empowered with omnipotence and shielded from natural inquiry, can be used to explain any mysterious event.

Finally, humans can imagine the thoughts and intentions of others and imagine that they are different from our own, a trait known as theory of mind. The condition, which is severely diminished in autistic children, is so fundamental to what it is to be human that it might be a necessary precondition for civilization. It is a small step from imagining the mind of another person—even if you have no direct access to it—to imagining the mind of a deity.

Taken together, the evolutionary adaptations that made the garden of human society flourish also provided fertile ground for belief in God. Of course, it is impossible to transport ourselves back to early civilization to rigorously test these ideas, so perhaps one more idea about the divine will have to wait for verification.