In most facets of life, people are perfectly content to let other people act in accordance with their tastes, even when others’ tastes differ from their own. The supertasters of the world, for instance—that 15-or-so percent of us whose tongues are so densely packed with taste buds that they find the flavors of many common foods and drinks too rich or too bitter to enjoy—have at no point in history ever taken to the streets to demand global bans on cabbage or coffee. And the world’s normal tasters, who clearly have a numerical advantage over the supertasters, have never tried to force the supertasters into eating and drinking against their own preferences.

Religion sits at the other end of the “vive la différence” spectrum. All of the world’s major religions, practiced by five out of every seven people on the planet today, teach people to concern themselves with other people’s behavior—and not just the behavior of the people within the religion. Instead, they often teach their adherents to take an interest in outsiders’ behavior as well. Why? Recent scientific work is helping to solve this puzzle—and it has yielded a discovery that Freud would have loved.

At the moment, there are two popular families of theory that seek to explain why religion causes people to praise some behaviors and to condemn others. According to the first of these two lines of theorizing, people espouse religious beliefs—particularly a belief in an all-seeing sky god who watches human behavior and then metes out rewards and punishments (in this life or the next)—because it motivates them (and others) to be more trusting, generous, and honest than they otherwise would be.

But a newer line of theorizing called reproductive religiosity theory proposes that religious morality is not fundamentally about encouraging cooperation. Instead, people primarily use religion to make their social worlds more conducive to their own preferred approaches to sex, marriage, and reproduction. For most of the world’s religions over the past several millennia (which have historically thrived in state societies with agricultural production as the primary economic driver), the preferred sexual strategy has involved monogamy, sexual modesty, and the stigmatization of sex outside of marriage (arguably because it helps to insure paternity certainty, thereby reducing conflict over heritable property such as farm land). Reproductive religiosity theory has a lot to commend it: In a recent cross-cultural study involving over 16,000 participants from fifty-six different nations, researchers found that religious young people (from every region of the world and every conceivable religious background) were more averse to casual and promiscuous sex than were their less religious counterparts. (Tellingly, in most regions, religion also appeared to regulate sexuality more strongly for women than for men.)

Both theories predict that strongly religious people will espouse stricter moral standards than less religious people will—and virtually every survey ever conducted supports this prediction. Religious belief seemingly influences people’s views on topics as varied as government spending, immigration, social inequality, the death penalty, and euthanasia, not to mention homosexuality, same-sex marriage, abortion, pornography, and the role of women in society, but for most of the issues that are not explicitly related to sex, marriage, and reproduction, religion’s influence appears to be rather slight. For the sex-related issues, however, religion’s apparent influence tends to be much stronger.

Reproductive religiosity theory—positing, as it does, that religion really is mostly about sex—makes an even bolder prediction: After you have statistically accounted for the fact that religious people have stricter sexual morals than less religious people do (for instance, they are more disapproving of homosexuality, sexual infidelity, abortion, premarital sex, and women in the workplace), then highly religious people will appear to care little more about violations involving dishonesty and broken trust (transgressions such as stealing, fare-dodging, tax dodging, and driving under the influence, for example) than non-religious people do.

This bolder prediction has now been supported resoundingly, and not only among Americans, but also in a study involving 300,000 respondents from roughly ninety different countries. Highly religious people from around the world espouse stricter moral attitudes regarding both prosociality and sex, but the religious people’s stern moral attitudes toward honesty-related infractions seem to be, from a statistical point of view, mostly along for the ride. It is sex, marriage, and reproduction—and not trust, honesty, and generosity—that lie at the core of moralization for most practitioners of the world religions.

As I mentioned earlier, Freud would have loved these results, but perhaps we shouldn’t be too surprised that religion’s most potent effects on morality relate to sex, marriage, and reproduction. After all, sex is awfully close to the engine of natural selection, so it is not unlikely that evolution has left us highly motivated to seek out any tool we can—even rhetorical ones of the sort that religion can provide—to make the world more conducive to our own approaches to love and marriage. Even so, the intimate link between religion and sexual morality is a particularly important element of certain recent geopolitical developments, so we need to understand it better than we do now.

Over the past several years, Islamic extremists of the Middle East and Sub-Saharan Africa have been systematically perpetrating sexual atrocities against girls and women, and as they have done so, they have drawn explicitly on the moral support of their religious traditions. Make no mistake: War rape is nothing new, all of it is appalling, and none of it is acceptable. But to understand what is happening right now—at a time when Boko Haram fighters capture and then seek to impregnate hundreds of Nigerian schoolgirls, at a time when ISIS fighters capture thousands of Yazidi girls and women and then consign them to lives of unceasing sexual terror—we need to figure out how sets of religious beliefs that are ordinarily bolstered to support monogamy and seemingly bourgeois “family values” can transform gang rape and sexual slavery into religious obligations, not mention the perquisites of having God on your side.