Also, the religion-as-opiate theory fits best with the monotheistic religions most familiar to us. But what about those people (many of the religious people in the world) who do not believe in an all-wise and just God? Every society believes in spiritual beings, but they are often stupid or malevolent. Many religions simply don't deal with metaphysical or teleological questions; gods and ancestor spirits are called upon only to help cope with such mundane problems as how to prepare food and what to do with a corpse—not to elucidate the Meaning of It All. As for the reassurance of heaven, justice, or salvation, again, it exists in some religions but by no means all. (In fact, even those religions we are most familiar with are not always reassuring. I know some older Christians who were made miserable as children by worries about eternal damnation; the prospect of oblivion would have been far preferable.) So the opiate theory is ultimately an unsatisfying explanation for the existence of religion.
The major alternative theory is social: religion brings people together, giving them an edge over those who lack this social glue. Sometimes this argument is presented in cultural terms, and sometimes it is seen from an evolutionary perspective: survival of the fittest working at the level not of the gene or the individual but of the social group. In either case the claim is that religion thrives because groups that have it outgrow and outlast those that do not.
In this conception religion is a fraternity, and the analogy runs deep. Just as fraternities used to paddle freshmen on the rear end to instill loyalty and commitment, religions have painful initiation rites—for example, snipping off part of the penis. Also, certain puzzling features of many religions, such as dietary restrictions and distinctive dress, make perfect sense once they are viewed as tools to ensure group solidarity.
The fraternity theory also explains why religions are so harsh toward those who do not share the faith, reserving particular ire for apostates. This is clear in the Old Testament, in which "a jealous God" issues commands such as:
"Should your brother, your mother's son, or your son or your daughter or the wife of your bosom or your companion who is like your own self incite you in secret, saying Let us go and worship other gods' ... you shall surely kill him. Your hand shall be against him first to put him to death and the hand of all the people last. And you shall stone him and he shall die, for he sought to thrust you away from the LORD your God who brought you out of the land of Egypt, from the house of slaves. —Deuteronomy 13, 7:11
This theory explains almost everything about religion—except the religious part. It is clear that rituals and sacrifices can bring people together, and it may well be that a group that does such things has an advantage over one that does not. But it is not clear why a religion has to be involved. Why are gods, souls, an afterlife, miracles, divine creation of the universe, and so on brought in? The theory doesn't explain what we are most interested in, which is belief in the supernatural.
Enthusiasm is building among scientists for a quite different view—that religion emerged not to serve a purpose but by accident.
This is not a value judgment. Many of the good things in life are, from an evolutionary perspective, accidents. People sometimes give money, time, and even blood to help unknown strangers in faraway countries whom they will never see. From the perspective of one's genes this is disastrous—the suicidal squandering of resources for no benefit. But its origin is not magical; long-distance altruism is most likely a by-product of other, more adaptive traits, such as empathy and abstract reasoning. Similarly, there is no reproductive advantage to the pleasure we get from paintings or movies. It just so happens that our eyes and brains, which evolved to react to three-dimensional objects in the real world, can respond to two-dimensional projections on a canvas or a screen.
Supernatural beliefs might be explained in a similar way. This is the religion-as-accident theory that emerges from my work and the work of cognitive scientists such as Scott Atran, Pascal Boyer, Justin Barrett, and Deborah Kelemen. One version of this theory begins with the notion that a distinction between the physical and the psychological is fundamental to human thought. Purely physical things, such as rocks and trees, are subject to the pitiless laws of Newton. Throw a rock, and it will fly through space on a certain path; if you put a branch on the ground, it will not disappear, scamper away, or fly into space. Psychological things, such as people, possess minds, intentions, beliefs, goals, and desires. They move unexpectedly, according to volition and whim; they can chase or run away. There is a moral difference as well: a rock cannot be evil or kind; a person can.
Where does the distinction between the physical and the psychological come from? Is it something we learn through experience, or is it somehow pre-wired into our brains? One way to find out is to study babies. It is notoriously difficult to know what babies are thinking, given that they can't speak and have little control over their bodies. (They are harder to test than rats or pigeons, because they cannot run mazes or peck levers.) But recently investigators have used the technique of showing them different events and recording how long they look at them, exploiting the fact that babies, like the rest of us, tend to look longer at something they find unusual or bizarre.
This has led to a series of striking discoveries. Six-month-olds understand that physical objects obey gravity. If you put an object on a table and then remove the table, and the object just stays there (held by a hidden wire), babies are surprised; they expect the object to fall. They expect objects to be solid, and contrary to what is still being taught in some psychology classes, they understand that objects persist over time even if hidden. (Show a baby an object and then put it behind a screen. Wait a little while and then remove the screen. If the object is gone, the baby is surprised.) Five-month-olds can even do simple math, appreciating that if first one object and then another is placed behind a screen, when the screen drops there should be two objects, not one or three. Other experiments find the same numerical understanding in nonhuman primates, including macaques and tamarins, and in dogs.
Similarly precocious capacities show up in infants' understanding of the social world. Newborns prefer to look at faces over anything else, and the sounds they most like to hear are human voices—preferably their mothers'. They quickly come to recognize different emotions, such as anger, fear, and happiness, and respond appropriately to them. Before they are a year old they can determine the target of an adult's gaze, and can learn by attending to the emotions of others; if a baby is crawling toward an area that might be dangerous and an adult makes a horrified or disgusted face, the baby usually knows enough to stay away.
A skeptic might argue that these social capacities can be explained as a set of primitive responses, but there is some evidence that they reflect a deeper understanding. For instance, when twelve-month-olds see one object chasing another, they seem to understand that it really is chasing, with the goal of catching; they expect the chaser to continue its pursuit along the most direct path, and are surprised when it does otherwise. In some work I've done with the psychologists Valerie Kuhlmeier, of Queen's University, and Karen Wynn, of Yale, we found that when babies see one character in a movie help an individual and a different character hurt that individual, they later expect the individual to approach the character that helped it and to avoid the one that hurt it.
Understanding of the physical world and understanding of the social world can be seen as akin to two distinct computers in a baby's brain, running separate programs and performing separate tasks. The understandings develop at different rates: the social one emerges somewhat later than the physical one. They evolved at different points in our prehistory; our physical understanding is shared by many species, whereas our social understanding is a relatively recent adaptation, and in some regards might be uniquely human.