SHANKAR VEDANTAM, HOST:

Hey there. Shankar here. Some of you may have recently noticed a bunch of extra episodes from different NPR shows in your podcast feed. If so, it was caused by a web server error at our end. We're very sorry about this, and we're working to fix the problem. We'll have updates at npr.org/help. OK. Here's the show.

(SOUNDBITE OF ARCHIVED BROADCAST)

VEDANTAM: This is HIDDEN BRAIN. I'm Shankar Vedantam.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED CHORUS: (Singing) Good Christians all, rejoice, and sing.

VEDANTAM: On a hot summer morning, worshippers gather at the First Baptist Church in Washington, D.C. They've come in their Sunday best - sharp suits and flowing skirts, shined dress shoes and spiky high heels. They've come to be among friends and family, to pray and sing and rejoice after a long and hectic week.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED CHORUS: (Singing) Now is the triumph of...

VEDANTAM: If you've taken part in a religious service at a church or another house of worship, have you ever stopped to think about how it all came to be? How did people become believers? Where did the rituals come from? And most of all, what purpose does it all serve?

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED CHORUS: (Singing) Hallelujah.

VEDANTAM: When we ask these questions, we most often look to history or theology for answers. But some social scientists are asking if we can better understand religion through the lens of human behavior. If people behave in particular ways when exposed to different religious cues, can we use this information to work backwards and understand how those religious practices came about in the first place? Can the rise and fall of different religions tell us something about the needs of societies and how those needs change over time?

Today, we're going to take an in-depth look at these provocative ideas through the work of Azim Shariff, a psychology professor at the University of British Columbia. He studies religion not from the point of view of faith or spirituality but from a psychological perspective. He argues that human societies changed in a fundamental way several thousand years ago, and this required a new psychological innovation.

AZIM SHARIFF: So for the vast, vast history of our species, we didn't live in large groups. We lived in very small groups, groups about 50 people, groups that never really got larger than 150. And the reason for that is because from a genetic standpoint, we're only built to be able to cooperate with as many people as we can know well. So when you start having anonymous strangers in groups, when you start having people whose reputation you're unfamiliar with, what that means is that people can free ride on the group. They can cheat on the group with impunity. And when you start having large groups of free riders and cheaters in a group, it can't sustain itself. You need a level of cooperation between the people in a group for it to act and to work harmoniously.

And so it was only in the last 12,000 years that we started getting groups that bubbled up from beyond 100, 150 people to 1,000, 10,000 people. And what that means is that it needed something more than just our genetic inheritance. It needed a cultural idea. It needed a cultural innovation to allow us to succeed in these larger groups. And so one of the things that me and my colleagues have been arguing is that religion was one of these cultural innovations.

(SOUNDBITE OF MUSIC)

VEDANTAM: And not just religion in general. It was one specific aspect of religion - the idea of a supernatural punisher, also known as God. It's a concept we'll return to over and over again this hour. Basically, if early humans could be convinced that a god was going to punish them if they didn't act in line with the interests of the group, well, they would start to cooperate.

SHARIFF: And we see really interesting examples of this - so large trade networks that have existed in North Africa where you have people who have no way that they can know each other. They're from opposite ends of an entire continent. And yet simply because they have a common religion - in this case, Islam - they can trust that the other person is going to be a reliable trading partner. And so just knowing that other people are God-fearing believers is sufficient to act as a cue of trust.

UNIDENTIFIED SINGER #1: (Singing in Arabic).

VEDANTAM: So how does this clinical view of religion square with the way most believers think about faith?

UNIDENTIFIED SINGER #1: (Singing in Arabic).

AKBAR AHMED: The azan, or the call to prayer, is when Muslims are asked to come to a mosque or to an Islamic center five times a day to remember God.

VEDANTAM: Throughout this episode, we're going to have religious scholars and practitioners talk about their experience of faith. Here's Islamic scholar Akbar Ahmed on the Muslim call to prayer.

AHMED: The call to prayer in Arabic is very simple. It simply is Allahu akbar; Allahu akbar; Allahu akbar. Hayya 'alas-salah. Hayya 'alas-salah. Hayya 'alal-falah. Hayya 'alal-falah. It's simply saying, God is great. God is great. God is great. God is great. Come to prayer. Come to prayer. Then it repeats, come to welfare, to what is good for you. Come to what is good for you. And then ends by saying again, Allahu akbar; Allahu akbar. So in a sense, it's a very simple call to put aside the daily tedium, the daily tensions and problems. And it can be very therapeutic.

UNIDENTIFIED SINGER #1: (Singing in Arabic).

VEDANTAM: Azim Shariff hears the Muslim call to prayer very differently. He hears it as a researcher. He cites evidence from psychology and anthropology to show that religious practices like the Muslim call to prayer have measurable effects on human behavior.

SHARIFF: These studies are taking advantage of existing naturalistic cues of religion that are all around people when they're living in the Muslim world. This is the most salient reminder of religion in Muslim-majority countries. And so a couple of studies have used that as the cue. One of them looked at cheating behavior. And what they found is that when the azaan, the call to prayer, is audible, people are much less likely to cheat.

UNIDENTIFIED SINGER #2: (Singing in Arabic).

VEDANTAM: In another study, researcher Eric Duhaime gave money to shopkeepers in Morocco and told them they could either keep the money for themselves or donate it to charity.

SHARIFF: And he recorded how much they gave during regular parts of the day and how much they gave when the call to prayer was going off. And the results were remarkable. So first of all, the shopkeepers were generally quite generous. And they were generally quite charitable. But when the call to prayer was audible, everybody gave all the money to charity. It's the most remarkably consistent finding that I've seen. It was a remarkable effect that this audible queue of religion actually had on people.

UNIDENTIFIED SINGER #2: (Singing in Arabic).

VEDANTAM: Azim's point is not that religion always has positive effects on people. He's saying it's possible to study the effects of religious practices on human behavior just like you can study the effect of financial incentives or education.

(SOUNDBITE OF MUSIC)

VEDANTAM: By measuring which religious practices change how people behave and which don't, you can start to understand the roles that different religions have played in different societies.

(SOUNDBITE OF MUSIC)

VEDANTAM: Take a look at this now-classic study from the Princeton Theological Seminary in 1973. Two researchers tested the effect of religious cues on helpfulness. Surely, students training to be pastors would lend someone a hand, right? It's known as the good Samaritan study, and it's based on a famous parable from the Bible. In the story, a traveler is robbed, beaten and left for dead along the side of a road. Two people walk by and do nothing to help. And then, finally someone stops, a Samaritan. It's a tale that's been told and retold for centuries like in the sermon by Martin Luther King Jr.

(SOUNDBITE OF ARCHIVED RECORDING)

MARTIN LUTHER KING JR: Finally, a man of another race came by. He got down from his beast, decided not to be compassionate by proxy. But he got down with him, administered first aid and helped the man in need. Jesus ended up saying, this was the good man; this was the great man.

VEDANTAM: So the students were told the story of the good Samaritan and then asked to go to another building to complete a task. But here's a sneaky part. Along the way, the researcher strategically placed a man slumped over in an alleyway who looked like he needed some help just like in the Bible story they had heard a few minutes ago. Would they stop and lend him a hand?

SHARIFF: The study famously did not find any difference between the religious people and nonreligious people. In fact, the only predictor of whether somebody would help or not was whether they were in a rush or not. So if you were in a rush, regardless of whether you're religious or nonreligious, you wouldn't help. And if you were not in a rush, well, then you would help regardless of these fundamental beliefs that you have about religiosity.

(SOUNDBITE OF MUSIC)

VEDANTAM: So we've seen one example where a cue from religion changes how people behave, the Muslim call to prayer in Morocco and another where it doesn't, the good Samaritan study. So why does one queue make a difference while the other does not? Azim says a lot depends on the context. One important piece of context you might not consider - the kind of God being invoked. Consider the difference between depictions of gods who are angry...

(SOUNDBITE OF FILM, "THE TEN COMMANDMENTS")

CHARLTON HESTON: (As Moses) Those who will not live by the law shall die by the law.

VEDANTAM: ...And voices that are much less scary.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED SINGER #3: (Singing) God is love. He loves his children, and he's willing to forgive them. God is love.

VEDANTAM: You run your own studies on cheating. And in one of them, you wrote how much you believe in God matters less than what kind of god you believe in. What did you mean?

SHARIFF: Well, so there we wanted to see whether believing in a punitive God versus believing in a forgiving God - so a forgiving God would be one that you see predominantly to be loving and comforting and forgiving but not angry, vengeful or punitive - whether that makes a difference in terms of your likelihood to cheat. And the reason that's significant is because there are theories which suggest that a punitive God has become so popular in religions because it's an effective stick to deter people from immoral behavior.

And so in this study, we had students come in and do this math task where we made it very tempting for them to cheat. And we wanted to see who would cheat. But we also collected data on what their view of God was. So we had them fill out their belief that their God is represented by various adjectives. And some of these adjectives were loving, comforting, kind, forgiving, and others were angry, vengeful, punitive, wrathful. And we wanted to see whether that made a difference. And indeed it did. We found that the people - the more you believed your god to be on the punitive side that spectrum, the less likely you were to cheat, whereas the more you believed your god to be loving, the actual more likely you were to cheat.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED SINGER #3: (Singing) He loves his children. And he's willing to forgive them. God is love.

VEDANTAM: What you're suggesting in some ways is that people are behaving, you know, very rationally. If you believe in an angry, vengeful, punitive god and you believe that this god is going to harm you if you do something wrong, it's perfectly rational for you to stick to the straight and narrow.

SHARIFF: Yeah. And I would argue that this, again, is - I think it's no accident why the most successful religions have been - and I mean successful in terms of just sheer numbers. The societies that have been able to grow largest with the religions that they believe in have had this idea of supernatural punishment at their core because it is an effective deterrent. It does compel people rationally to act in ways which will avoid the wrath of a punitive god who can punish you quite severely.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #1: So according to the Scriptures, hell is a place that literally exists. That's not a Baptist doctrine. That's not a Methodist doctrine. That's a doctrine of the Bible. It exists, friend. It was made, therefore, as a place of punishment, not a place to simply go to...

VEDANTAM: Besides the psychological studies, Azim says there's evidence from history and anthropology that suggests modern religions arose to solve problems related to trust and cooperation. All the world's major religions today arose at times when human societies were struggling with the challenges of size, complexity or scarcity.

SHARIFF: Certain religious ideas that would be most effective at encouraging people to be prosocial, like this idea of a big, omniscient, punitive god, tend to crop up in those particular circumstances when cooperation is particularly necessary. So if you look at societies that were larger - that is, with more anonymous strangers - you tend to see these types of gods emerge more frequently in those societies. But you also see them emerge more frequently in societies that faced, say, particularly acute resource scarcity issues. So in a place where it's very, very important that you share water in trustworthy, equitable ways, you see these types of big, omniscient, punitive gods emerge there, as well. And so there is this, yes, this correlation, as far as we can tell now, between the necessity of cooperation and the types of cultural innovation, the religious innovations that would be most effective at bringing it about.

VEDANTAM: What is the evidence that we have that in earlier societies that were much smaller, people didn't believe in these big gods or these gods that have these huge effects or these punitive gods?

SHARIFF: So if you look both at the archaeological record, as well as modern hunter-gatherer tribes - so modern tribes that still live in ways that were similar to how we lived prior to 12,000 years when there was the agricultural revolution, we started settling in large groups - those types of small societies where you don't have those anonymous stranger challenges tend not to have these large, punitive gods. Their gods tend to be smaller and weaker and less morally concerned. And so you tend to see that those large gods, the punitive gods, only emerge when it's necessary to have that cooperation spread. And when you have these small societies, you don't need that.

VEDANTAM: Can you give me an example?

SHARIFF: So a lot of research has been done on these small tribes like the Hadza, where the gods are - they're more like trickster spirits. They're neither omniscient nor are they punishing the types of immoral behavior that would be necessary to get rid of in order to be cooperative. The gods are, again, small, forest spirits or trickster spirits that don't have the power nor the punitive ability nor the, really, concern for these moral issues.

VEDANTAM: Now, of course, this view of religion - comparing ancient hunter-gatherer tribes with modern societies or measuring which gods produce what behavior - this kind of thinking can seem completely upside down to you if you're a person of faith. If you're a believer, this is not the way you think about religion. Your faith is a source of meaning, guidance, comfort. It's a connection to something greater than yourself. Let's go back to Islamic scholar Akbar Ahmed.

AHMED: I know that at times when I'm sitting in the Muslim world, especially in the evening at (speaking Arabic) time, when you know there's that magical moment when the day has just died and the night has not quite begun and there's that twilight in the atmosphere and suddenly, there's a complete hush for a few seconds. Then you hear the azan, the beautiful azan. And it drifts. And writers have said, poets have said, it's like a feather in flight. It just drifts on in the air almost as if it is weightless in its beauty. And it just undulates on and on, so in that sense, it is a beautiful part of the symphony of Islam itself.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED SINGER #1: (Singing in Arabic).

VEDANTAM: I'm wondering whether you ever get pushback from religious people who basically are angry that you are dissecting their faith in a way that says, I can study this as if it's an organism under a microscope. I can study when it flourishes, when it doesn't flourish, how it grows, why it grows in one context, doesn't grow in another context. And people say, I believe because this god is a real god. I believe because this god has a real effect in my life, you shouldn't be coming in and studying this as if it's a scientific project.

SHARIFF: So, yes, there is pushback. There's pushback from both sides for different reasons. I get pushback for that precise reason. People who are people of faith believe their religions to be divinely inspired. And so when you're reaching for naturalistic explanations for religion, that leaves little room for the divine inspiration. The origins for the religion become overdetermined. You have both a naturalistic reason for why it exists, and you have a divine reason for why it exists. And you don't need both. And so if you're positing a naturalistic explanation, well, then maybe it casts some doubt or threat on the divine inspiration explanation. And so that's a very, I think, legitimate pushback from their perspective.

I also get pushback from people who have a bone to pick against religion. And the reason for that is because some of the research I do empirically demonstrates some of the positive effects that religion has. And if people have a bone to pick with religion, they tend not to like to admit that there's anything good about religion. And so I get hate mail from both sides.

(SOUNDBITE OF MUSIC)

VEDANTAM: When we come back, we'll take a closer look at one of Azim's more controversial ideas. Given that different religions have risen and fallen over the centuries, can you study religion as if it were a living organism subject to the rules of Darwinian natural selection?

SHARIFF: I think that the application of evolutionary theory has really revolutionized our understanding of the origins and functions of religion.

(SOUNDBITE OF MUSIC)

VEDANTAM: This is HIDDEN BRAIN. I'm Shankar Vedantam. Let's take a moment to go back in time. For the vast majority of human history, we lived in small groups of around 50 people. Everyone knew everybody. If you told a lie, stole someone's dinner or didn't defend the group against its enemies, there was no way to disappear into the crowd. Everyone knew you, and you would get punished. But in the last 12,000 years or so, human groups began to expand from a few dozen to more than a thousand. And now it wasn't so easy to punish the cheaters and the free riders. So we needed something big, vast, an epic force that could see what everyone was doing and enforce the rules. Since individual people could no longer police gigantic groups, the policing had to be done by a force that was superhuman. That force, according to psychologist Azim Shariff, was the modern idea of a punitive god, the kind that many preachers warn can send you to hell.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #1: Hell is a place. It is a place that existed before you were ever born. It is there. It's going to be there. And there's nothing you can do to change that one bit, whatsoever.

VEDANTAM: Azim says the many religions we see around us today emerged in different societies at different times as mechanisms to solve problems of trust and cooperation.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #1: It doesn't make any difference if the churches today have stopped preaching on hell, if the preachers don't preach on hell. It is still a place that you must deal with one day.

VEDANTAM: So the picture that you're painting for me, Azim, is this really fascinating picture that religion has all these different effects on people. It has an effect on how we trust one another, how we're generous towards one another. Sometimes we're generous when we're reminded of religiosity, when we're reminded of the divine. It makes a difference whether the gods we believe in are benevolent gods or angry gods. It's also the case that maybe some religions flourish and thrive at a certain moment or in a certain ecosystem but then wither and fail away in another ecosystem. And it seems to me all of these different things are pointing to the same fundamental theory, which is that you're looking at religion as an evolutionary phenomenon. You're trying to understand how it can work in one context, how it can fail in another context, how you can study it almost as a living organism.

SHARIFF: Yes. I think that's exactly right. I think that the application of evolutionary theory has really revolutionized our understanding of the origins and functions of religion. Now, in evolutionary theory, one of the most exciting developments is extending the Darwinian logic of selection of organisms based on how well they fit their environment to cultural ideas, as well, and cultural groups, as well. And this is what's called cultural evolution, or cultural evolutionary theory. It's also called dual inheritance theory. And the reason it's called dual inheritance theory is because unlike most other animals, humans come into the world with not just a genetic inheritance from their parents but an entire line of cultural ideas that get passed down to them, as well. And for about a hundred thousand years, we have been a necessarily cultural species. We have not been able to survive without the cultural knowledge that we inherit.

And so a good example of this is fire. That's a cultural idea. If we didn't have that, we would not be able to survive because our bodies have now adapted to needing fire to predigest - that is, cook our food. And so the idea is that religion is one of these cultural ideas that similarly serves these functional roles in our lives and has done for at least 10,000 years. So what that means is that you can understand religions as they are today - today's major religions - as bearing the legacy of thousands of years of trial and error and selection so that what current religions are made up of, they're made up of those things because those served social functions in the past. They contributed to the societies that they were attached to surviving.

VEDANTAM: You can see these patterns in the historical record. For example, ancient humans worshipped gods who could prevent natural disasters. But as the needs of societies changed, their gods changed, too.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #2: Let us pray.

VEDANTAM: As people built cities and civilizations that were more resilient, new kinds of gods...

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #2: Welcome to the prayer to do well in school.

VEDANTAM: ...With different powers emerged, and the requests people made of them changed as well.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #2: Father, we decree and declare that, as they prepare for school - for tests and exams - show them what to study and how to study most effectively. Lord, please give them wisdom and understanding, as well as knowledge...

VEDANTAM: Azim's point is that local conditions, like individual ecosystems, can create conditions where certain beliefs flourish and where others fade away. If belief in a certain god helps a group to thrive, that religion is likely to spread. An evolutionary theory of religion could also explain why many religions are deeply - some might say obsessively - interested in questions related to sex.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #3: No. 1 warning sign - amorous glances.

VEDANTAM: You can hear these themes in religious broadcasts all the time - how much sex to have...

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #3: Flirtatious looks. Look at Proverbs 6 and 25 with me, if you would.

VEDANTAM: ...Whom to have sex with...

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #3: It says do not lust after her beauty in your heart...

VEDANTAM: ...How to avoid certain kinds of sex.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #3: ...Nor let her allure you with her eyelids.

VEDANTAM: And it makes sense from a Darwinian perspective. Sex is about reproduction, and the organization of families and the growth of a population are integral to the long-term survival of societies.

SHARIFF: One of the things that's very common among religions is to have norms regulating what you could call family values. You should have a lot of kids.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #4: Three, four, six, 12?

UNIDENTIFIED PERSON #5: (Laughter).

UNIDENTIFIED PERSON #4: I mean, how many - is there a biblical mandate of how many we should have?

UNIDENTIFIED PERSON #5: Well, there is a biblical mandate, if you will, that says, God blessed them and said, be fruitful and multiply.

SHARIFF: You shouldn't have homosexual relationships.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #6: I say it's wrong because that's what the Scripture says.

SHARIFF: You shouldn't have that much birth control.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PERSON #7: If we look at the Bible tonight and examine this, we'll see that this is actually not something that God wants us to do.

SHARIFF: Now, those also serve these culturally adaptive purposes because they encourage people to produce lots of children. Having lots of children leads to larger societies. Larger societies can outcompete those societies that didn't have a lot of children. So if you had two religions - one which said, have a lot of sex, make a lot of children, don't use birth control, another one that said, never have sex, or, if you do, only use birth control - which society, looking down one, two, three generations, is going to be better off? Well, the one that actually produced offspring, became a larger civilization, a civilization that was able to outcompete either in active warfare or just through taking the resources of the other society. It's a competition between cultural ideas and cultural groups such that those socially functional ideas tend to be preserved over generations. And so this is how cultural evolution works.

VEDANTAM: So if you buy the idea that religions arose at a certain point of time, that in some ways they're a form of cultural evolution, and certain types of religions and certain types of gods arose at certain points in time in order to confer certain kinds of cultural benefits on groups of people, one of the challenges, of course, is that, if I'm a religious person, and I now think of religion as being a marker of my willingness to trust the next person who's also a religious person, there is an incentive for people to cheat - for people to sort of say, I'm actually a religious person, I deeply believe in this God, when in fact they don't because they just want to take all the advantages that come from religious faith. And this brings us to the idea of rituals and the idea of costly rituals. Talk about this idea. Why would you have the development of costly rituals, in some ways, as a precondition to how religion ends up enforcing these cultural norms?

SHARIFF: So this is one of the really great examples of how evolutionary theory can inform our understanding of religion. Things that were previously mysterious about religion now makes sense in an evolutionary perspective. So in evolution, there's this concept of costly signaling, that you have a hard-to-fake signal, which serves as a reliable cue of something you're trying to demonstrate. So the classic example of this is peacock feathers.

(SOUNDBITE OF PEACOCK CALL)

SHARIFF: The male peacock has this beautiful plumage, which is a sexual display. And the reason it's an effective sexual display is because only the healthiest peacocks can have the large plumage because of how costly it is to other aspects of the peacock's life. It can't fly very fast. It can't run away very much. It makes it very visible to other predators. And so if you're not the healthiest of peacocks and you try to fake this plumage, well, you're going to get eaten. And so the peahens, the female peahens, can use the display as a reliable indicator that, well, if I mate with this one, he actually has good genes because if he didn't have good genes, he would not be able to have this beautiful plumage. And so that might seem like an unrelated example, but if you look at the costly rituals that happen in religion, those are indications to other people in your group that you are a true believer. You are showing in a costly way indications that you're a believer. It is a hard-to-fake signal. If you weren't a true believer, you wouldn't go through all that effort.

VEDANTAM: Effort like following the vows of chastity, poverty and obedience in Catholicism...

UNIDENTIFIED PERSON #8: We don't see them as restrictive rules. We see them as freeing.

VEDANTAM: ...Keeping kosher in Judaism...

UNIDENTIFIED PERSON #9: When I eat, I know that I am a Jew.

VEDANTAM: And wearing a veil or headscarf in Islam.

UNIDENTIFIED PERSON #10: I use it to identify myself. I use it to be a symbol of who I am.

SHARIFF: Now you have trustable cues, credibility-enhancing displays of people's genuine religiosity, which indicates that you actually can trust them.

VEDANTAM: I want to take a closer look at one of those rituals to underscore the difference between the way believers think about religious practices and Azim's theory.

Jainism, a small South Asian religion, has lots of rituals that ask for sacrifices, like fasting.

(SOUNDBITE OF BANGING)

VEDANTAM: Jainism is somewhat similar to Hinduism and Buddhism in that one of its core tenets is nonviolence. Jains are strict vegetarians. And each year, they observe a holiday called Paryushan. It's a week-long fast where practitioners limit their consumption of both food and water. We've come to a Jain temple on the outskirts of Washington, D.C. It's a balmy Friday morning, and around two dozen people have gathered to celebrate the last day of Paryushan.

UNIDENTIFIED PEOPLE: (Chanting in foreign language).

VEDANTAM: The temple is actually a converted ranch-style house. The walls have been knocked down to make space for seating. The purpose of Paryushan is to repent for one's sins over the past year. Kamlesh Shah (ph) says these are seven days when he nourishes his soul rather than his body.

KAMLESH SHAH: I have done the full Upvas.

VEDANTAM: Upvas is a kind of fast.

K SHAH: An Upvas means that you do not eat anything at all.

VEDANTAM: The only nourishment is water. And that, too, has to be boiled first and then blessed. Many of the Jains who have gathered at the temple have completed similar fasts. Pahlavi Shah (ph) says Paryushan gives her a better perspective on the struggles that other people face in the world.

PAHLAVI SHAH: Yes, I did three fasting - three days separate, you know, without water. And I believe in that because if I do fast, you know, without food, what is my body? I can, you know - like, I can feel that, without food, we are nothing. So you know, that way, you know, I can help other people when they are hungry.

VEDANTAM: This willingness to go hungry for her faith also identifies Pahlavi as a true believer. She's willing to make a sacrifice that others are not. Now, of course, most religious people who make such sacrifices don't see what they're doing as costly signaling. Pahlavi isn't fasting in order to communicate to other Jains that she's a trustworthy member of the group. She's saying, I'm a devout person. My religion calls on me to make the sacrifice. I asked Azim about the difference between an evolutionary theory of rituals and how believers think about their behavior.

Again, I just wanted to clarify the difference between how people think in an individual way and sort of the effect this has at a group level. So for example, let's say your religion commands you to take a very costly and difficult pilgrimage, for example, that involves maybe physical difficulties or, you know, financial difficulties. The people who are embarking on that pilgrimage are not thinking to themselves, what I'm doing is a costly signal to other members of my religion. They're saying, I'm just a devout person. My religion calls on me to do this thing, and that's why I'm doing it. So there's a difference between how this might work in some ways at a community level, at a society level and how the individual practitioner thinks about it. The individual practitioner, the individual peacock, isn't thinking, let me grow beautiful feathers because that sends a costly signal.

SHARIFF: Yeah. So there's something that we can call functional opacity - that people are not aware of these ultimate reasons, the ultimate evolutionary reasons, why they're engaging in this behavior. They're aware of the - what we could call the proximate reasons, the immediate reasons, what they believe the reason they're doing it for. They're doing it because their god asks them to do it. But really, the reason that there is a belief that god would ask you to do that - the reason why that belief exists in the first place is because it serves that functional purpose. And so they're enacting rituals that serve larger, hidden purposes that are very functional for their societies. But to them, it's just what their religion tells them to do.

VEDANTAM: You know, I came by two interesting studies recently, one of them by Nicholas Hobson. And he found, along with other colleagues, that novel rituals, even when they are completely meaningless - you ask a group of people to perform a novel ritual, it has the power to increase trust among fellow members who are performing this novel ritual. The other study was by Panagiotis Mitkidis. And he showed, along with his colleagues, that extreme rituals often had a big effect on promoting moral behavior, not among the performers of the ritual but on observers.

SHARIFF: Yeah. So one of the leaders in this type of extreme ritual research is this anthropologist, Dimitris Xygalatas, who's done this really interesting research on fire walkers. And what you find is that when you have observers watching people undergoing these rituals, their actual heart beats synchronize with the people engaging in the rituals. And the more you have that synchronization, the more they feel like they're part of a group. And so you ask, well, why did fire walking emerge? Why did circumcision emerge? Why did any of these painful rituals - there's many, many more examples of really terribly painful rituals. Why did they emerge? It's not random. The ones that we have, the ones that have been preserved, exist because they have this impact on our psychology that allow groups to cohere around each other that allow this communication between members of the group that encourage trust between them.

So another example is this work on what's called synchrony, which is just engaging in actions at the same pace in the same rhythm as others. And you have this in terms of hymn singing. But you also have this in terms of marching that is often used in military drills for the same reason. When you're engaging in an action in rhythm with somebody else, that creates the psychological connection that makes people feel fused as a group.

VEDANTAM: You can hear the power of synchrony in chants of the word om.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PEOPLE: (Chanting) Om.

VEDANTAM: Here's Hinduism scholar Shubha Pathak.

SHUBHA PATHAK: It's a sacred syllable that seems to be created by adding three different Sanskrit letters together - the letter A, the letter U, and the letter ma (ph). It doesn't have a dictionary meaning, but it has a lot of connotations. And so in early Hinduism, in texts like the Upanishads - philosophical texts - it is used to represent the reality that encompasses the entire universe.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PEOPLE: (Chanting) Ooh.

PATHAK: Often a text or a chant, a mantra, will start with the syllable om. And I think the reason why that is is not only does it have this significance of standing for a particular god in his totality or her totality, but you have this column of sound that gives you a sense of vastness. I think it's sort of similar to what happens when you have two singers singing at the exact same frequency. You start to have these beats in the room. With om, it creates something around you, I think, that makes you feel like you're part of something.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED PEOPLE: (Chanting) Ooh.

(SOUNDBITE OF MUSIC)

VEDANTAM: This is HIDDEN BRAIN. I'm Shankar Vedantam. We've looked at a theory that suggests that religions arose to solve problems of social cohesion. Psychologist Azim Shariff makes the case that much like living organisms, religions have evolved over time with different gods and different faiths rising and falling away over the millennia. Azim argues that religions play a functional role in societies, helping them run more smoothly and strengthening the bonds of trust.

(SOUNDBITE OF MUSIC)

VEDANTAM: But religion can also be a source of conflict and war. Religious violence is often in the headlines.

(SOUNDBITE OF MONTAGE)

UNIDENTIFIED REPORTER #1: In Egypt this morning, there's new fighting between Christians and Muslims.

UNIDENTIFIED REPORTER #2: Buddhist monks have attacked dozens of mosques and churches in the last year.

UNIDENTIFIED REPORTER #3: The new extremists set fire to an orphanage.

UNIDENTIFIED REPORTER #4: It appears to show his beheading at the hands of ISIS.

(SOUNDBITE OF MUSIC)

VEDANTAM: Critics of religion sometimes point to such fanatical behavior and say, look; this is evidence that there's something wrong with religious faith. Psychologist Azim Shariff says such criticisms miss the point.

SHARIFF: So the first thing that needs to be said is that coalitional violence is very old in our species. It's something that we see shared with our closest cousins, the chimpanzees. And so it's something that does precede religion. But what religion adds to it I think is actually consistent with this evolutionary perspective, which is that we're going to engage in wars. The question is, does religion enhance your side's ability to triumph in those wars? And the thing that religion adds is more than any other factor I can think of, aside from perhaps family, religion allows people to be bound together in a way that allows them to die for and kill for each other. And so this ability to form very cohesive, very tight coalitions, as well as to introduce sacred values, things that people are willing to fight for beyond all utilitarian or rational calculus, allows religion to make people better fighters. So, yes, religion does contribute to our warlike nature, but it does so in a very adaptive - culturally adaptive way.

VEDANTAM: Azim is not saying that religious violence is socially desirable. He's saying that natural selection doesn't really care about being socially desirable. On average, a religion that helps societies triumph in war is a religion that spreads.

So there are lots of examples when I look at modern societies today where I see other institutions, other forces that in some ways offer competition to religion. When I think about what will cause people to fight and die, you now no longer need religious faith. You can have nationalism. You can have patriotism - people willing to die for the flag. When it comes to trust, you know, it - you and I don't have to belong to the same religion anymore. We can both agree - you can sell a house to me and I can buy a house from you because we both believe that there are institutions organized by the state that will ensure that you will actually sell the house to me and I will actually give you money for it.

I put my money in a bank every month, and I actually only see a bunch of digits on a piece of paper. But I trust that the bank at some level is actually holding onto my money. And I have absolutely no idea what religion the bankers belong to. Are these all examples of how modern societies have come to essentially displace the need for religion?

SHARIFF: So, yes, I think so. So in terms of these other isms that people are willing to fight and die for, it's important to know that the idea of sacred values extends beyond just religious values. There are nonreligious things that we sacralize. So as soon as you sacralize something, it allows people to fight and die for it, right? So we have a fertile psychological meadow that's ready to sacralize things. And you just have to find the right key to fit into that lock.

(SOUNDBITE OF SONG, "THE STAR-SPANGLED BANNER")

SHARIFF: Religion is a great one. It fits very well. But it's not the only thing that does so.

(SOOUNDBITE OF ARCHIVED RECORDING)

BARACK OBAMA: Thank you. God bless you, and God bless these United States of America.

(APPLAUSE)

SHARIFF: We'll sacralize ideas like freedom. We'll sacralize our nation.

(SOUNDBITE OF ARCHIVED RECORDING)

PRESIDENT DONALD TRUMP: Thank you. God bless you, and God bless America.

SHARIFF: We'll sacralize the flag.

(SOUNDBITE OF ARCHIVED RECORDING)

UNIDENTIFIED CHILDREN: To the flag of the United States of America. And to the republic...

SHARIFF: And in terms of the governmental institutions that can spread trust, one of the interesting things you see is that if you look across countries, those countries that report having the least importance of religion to their daily lives are the countries that have the highest faith in the rule of law. So those are the places where you trust the institutions, like the bank or contract enforcement or the police or the justice system. Once you can set up those types of trusted secular institutions, well, that obviates the need for a lot of what religion has done. Now, it's only been in recent years that we've been able to have those types of centralized effective institutions. And still, in most parts of the worlds, we're not able to. But in those places where we are, we see ourselves moving towards a post-religious world where a lot of the functions of religion are accomplished by other means and potentially better means.

(SOUNDBITE OF MUSIC)

VEDANTAM: Azim thinks that if regulations and good governance provide the trust and cooperation that religious bonds once provided, new kinds of faith might flourish - religions that don't have an angry god who threatens to punish you if you step out of line, religions that don't talk a lot about hell and damnation but instead spend more time on building community, offering services like cooking classes or singles' nights or child care.

SHARIFF: Especially in places where you had other structures that were allowing for people to act in these harmonious, cooperative ways - say, secular institutions of law - under that umbrella where religion no longer has to shoulder the burden of enforcing cooperation, you can have religions start tilting in the other direction, more towards the religious benevolence and away from the religious malevolence, which is no longer as necessary for that religion.

So a good example of this are Jehovah's Witnesses, and this is actually where some of these theories came from. I had Jehovah's Witnesses who would visit me when I was living in Vancouver. They'd visit me quite frequently because the first time they visited, my roommate was baking cookies, and she offered them cookies, and so they kept coming back. And I was fascinated by the conversations we had because one of them - they had their little Watchtower magazine, and it said - do we believe in hell? - on the cover. And then you had to open up and read that they didn't. And Jehovah's Witnesses - that's a relatively new religion, a relatively new sect of Christianity and one that emerged under this umbrella of an existing secular society. It emerged in the United States when the United States had laws that ensured that people would follow the rules.

VEDANTAM: I have to ask you. Have you ever been religious yourself?

SHARIFF: I was raised religious. I was raised Muslim, but I wandered away from the faith as a teenager. And I would consider myself a secular atheist now.

VEDANTAM: I'm wondering if you're ever at family gatherings or even family gatherings that are inspired by some kind of religious occasion where people feel that you are judging them and studying them and analyzing them the way that a scientist would study microbes under a microscope, that you're basically saying, I understand why you do this because there's a naturalistic explanation for this. And for someone who is deeply religious, for whom religion means a great deal emotionally, there is something probably quite painful about having someone come along and say, look; this is opaque to you, but there is a deep and hidden evolutionary reason why you believe what you believe. They're going to be upset at you, I would think.

SHARIFF: Yeah, so I do have a lot of religious family, still. And I've learnt over the years that I've been studying this topic that you pick your battles. You don't need to be confrontational about this. People benefit a lot from religion. People suffer a lot from religion, as well. But you can see when you know somebody very closely who is religious, often who's potentially going through struggles in their life - illnesses, whatever - that they benefit from the religion. And so I don't feel the need to explicitly threaten what is benefiting them quite a bit by challenging it. I think that people who are close to me know my position on religion, but I don't feel the need to be antagonistic about it. And as a result, I think we reach maybe some sort of uneasy peace.

(SOUNDBITE OF MUSIC)

VEDANTAM: Azim, thank you for joining me today on HIDDEN BRAIN.

SHARIFF: Thanks for having me.

VEDANTAM: Azim Shariff is a psychology professor at the University of British Columbia.

(SOUNDBITE OF MUSIC)

VEDANTAM: This episode of HIDDEN BRAIN was produced by Laura Kwerel, Lucy Perkins, Parth Shah, Jenny Schmidt and Rhaina Cohen. It was edited by Tara Boyle. Our team includes Thomas Lu and Adhiti Bandlamudi. Special thanks to the public radio show Interfaith Voices for allowing us to use their audio portraits. They're from a series on sacred sound called The Soundscapes Of Faith. Our unsung hero this week is Mike Czaplinski, a tech support god here at NPR. As we were putting the finishing touches on this episode, our editing software crashed in a way that no one at NPR had seen before. Mike fixed it and saved the day. Thanks, Mike.

For more HIDDEN BRAIN, you can follow us on Facebook and Twitter. If you like the show, please share it with a friend. Not everyone knows how to subscribe to a podcast. If you know someone who needs help, please show them how they can subscribe to our show. I'm Shankar Vedantam, and this is NPR.

(SOUNDBITE OF MUSIC)

Copyright © 2019 NPR. All rights reserved. Visit our website terms of use and permissions pages at www.npr.org for further information.

NPR transcripts are created on a rush deadline by Verb8tm, Inc., an NPR contractor, and produced using a proprietary transcription process developed with NPR. This text may not be in its final form and may be updated or revised in the future. Accuracy and availability may vary. The authoritative record of NPR’s programming is the audio record.