The question of why some people lose their faith and what to do about it has long vexed those who don't – check the Old Testament for some heated discourse on the topic. Recent polling indicates that the trend toward secularism has increased – even in the United States, one of the most religious countries in the world. The results of the latest American Religious Identification Survey (Aris) reveal that the "nones" – people whose stated religious affiliation is "none" – have grown from 8.1% in 1990, the first year the study was conducted, to 15% in 2008.

A November 2010 article in Christianity Today sought to discover why, and cited "moral compromise" as the first reason, meaning that people leave religion because they want to do things religion forbids, such as have premarital sex. Other reasons include intellectual doubts and being hurt in some way by a church.

Recognising the necessity of understanding specific reasons for specific departures, I propose an overarching reason for why people abandon religion: they leave when the tension becomes too great between what they want and need, and what religion tells them they should want and need.

In A History of God, Karen Armstrong states: "Despite its otherworldliness, religion is highly pragmatic." Her writings demonstrate that religion must work for us, meaning both that it must be viable and must accomplish something. When it ceases to work, we change or abandon it.

Part of religion's work has been to help us understand our needs and desires, and to establish guidelines for socially acceptable ways to meet them. Of course, one way it has done so is by dictating what our needs and desires should be.

Many people are happy and fulfilled following a religious creed. They like having a clear moral code, familiar rituals, continuity with a tradition, and a community that shares their values.

But religion is not the only institution able to provide those things. As people create new communities and traditions, some feel stunted and restricted by religious teachings that contradict modern metaphysical and ethical ideals. Others are frustrated by repetitive services that bear no relationship to their actual lives, when they crave meaningful intellectual stimulation or simply resent being bored.

Some might say that my framing of this issue into "what I want and need v what my church tells me to want and need" is just another version of moral compromise: "I need to be entertained on Sunday mornings; or I want to have sex outside marriage, or drink alcohol, or use contraception, though my church forbids it, so I'll leave." That doesn't change the fact that tension exists between religious dictates and personal desires, and that increasingly, people follow their own desires and reject religion's decrees.

Sex and gender are primary areas where this issue plays out. Most people need and want sex. Many people also object to monotheism's double-standard when it comes to sexual behaviour: women are generally expected to be more chaste than men. Despite continued religious emphasis on female chastity, the moral and social weight of female sexual activity or even promiscuity decreases in societies where reliable contraception is available – which, of course, is one reason certain religious groups want to restrict it. For many people, the primary moral issue becomes not controlling women's sexuality, but ending their oppression.

Likewise, conventional Christianity tells its adherents they must prevent gay people from marrying in order to protect marriage. Whereas more and more people want to extend the benefits of marriage to all adults, regardless of sexual orientation, and feel that doing so answers a need for justice and equality.

The Christianity Today article frets that from 1990 to 2008, the percentage of those aged 18-29 claiming no religion doubled, from 11% to 22%. I think this is good: the difficulty of reconciling competing ideas about what we should want and need increases when we follow religion's dictates before we have figured out for ourselves what will make us happy. I'm thinking of a scenario I've seen repeatedly in various iterations: someone discovers as they move through adulthood that their church does not reflect their core values – a realisation that undermines relationships with friends and family still devoted to the church.

In such cases, marriages are often especially threatened, in ways that leave both spouses feeling miserable and trapped. I know of a couple in their 30s who followed their church's advice to marry young and start a family. In agreement about religion when they married in their early 20s, they now disagree vehemently. They have six young children and very different ideas about how to raise them. Neither is happy; both want to see the other change, and each needs to be true to a code of ethics and belief that contradicts the other's.