Suppose you were to have a debate about "chemicals" and whether they were a bad thing. There's no doubt that lots of people agree. Harmful chemicals are something they will pay extra to avoid, just as they will pay to avoid tomatoes that have been genetically modified. But it would be a difficult debate for people who understand chemistry. I felt like that on Tuesday night, debating religion at York University with the Oxford chemist (and atheist) Peter Atkins. My side suffered a crushing defeat but I never felt that the people denouncing "religion" knew anything about it at all.

Just as "chemicals" means nasty things produced from oil and added to shampoo to some people, so "religion" meant, for most of the audience, Christianity or Islam.

If you take a young, white, middle-class British audience and ask them if the world would be a better place without Christianity or Islam, of course many will suppose it would. All that they know about those religions is that the moderates are opposed to sex, which is nonsensical if not actively evil, while the extremists are nonsensical and evil in all kinds of other ways as well. Nor will they know many believers socially. Religiously fervent students are quite rightly shunned by everyone normal.

The trouble is that nothing in this harmlessly parochial view equips people to think about religion in general. And it can easily lead to the terrible confusion that follows when we consider religious belief, or religions, "irrational".

The confusion here comes from supposing that whatever is not rational must be irrational and forgetting that there is a huge area of life where questions of rationality are wholly irrelevant. To ask whether religions are rational makes as much sense as asking whether they are pale green, or whether they taste like orange juice.

Yet underlying the rejection of religion as "irrational" is a completely unfounded belief that whatever replaces it must be more rational. If anything does replace a religion, it will in fact be something that does the same job – which, as far as I am concerned, makes it another religion. The needs that religion meets – for society as much as for the individual – arise from the nature of the world and of our evolved natures. It completely mystifies me that Darwinians can be shallow optimists. They will cheerfully explain that religions promote "groupishness"-building without asking whether groupishness-building is a successful strategy, as it very obviously is. Instead, they talk as if we could eliminate groupishness if only we could get rid of those other bastards, the groupish ones who build groups.

This is the kind of thinking that a university education is meant to eliminate, or at least weaken. I can't say I accomplished much along those lines the other day.