HERE'S something to puzzle over on this very special Sabbath, as you coax the giblets from the turkey and wonder again how late on Christmas Eve FedEx deliver: if church attendance is falling and nearly half of Britons identify as having no faith, how come our places of worship will be packed tonight as thousands of us head off to a Midnight Mass or Watchnight service? How come we'll gather together to sing carols whose lyrics take for granted a belief in the preposterous miracle of the Virgin birth? How come we'll listen to readings from a religious text many of us have never read, then sit through sermons predicated on a sense of spirituality few of us share?

Told you it was a puzzler.

The BBC's Religion and Ethics Review, published last Wednesday, may have stated that 84 per cent of people globally “affiliate with a religion” and that this is predicted to rise above 90 per cent over the next few years, but church attendance in Scotland – and in the UK generally – is falling. A census of Scottish churchgoers conducted in 2016 showed that attendance here has dropped by more than half since 1984, from 854,000 regular churchgoers to 390,000, or just over seven per cent of the population. The projected figure for 2025, meanwhile, is 290,000, or around five per cent of the population. Those figures mask a few up-ticks – churchgoing in Aberdeenshire has risen two per cent due to the presence of Polish migrant workers, for instance, while attendance among Scottish Pentecostals has doubled since 2002 – but you can see the direction of travel. The general trend is downwards and we can all have faith in that fact.

The claims that almost half of Britons now embrace secularism rather than spirituality has data behind it too. The annual British Social Attitudes survey, published in May, showed that the so-called “nones” – those who profess to have no religion – make up nearly 49 per cent of the British population. Even more worrying for the established churches, the number of “non-verts” is rising dramatically. These are people brought up to practise a religion but who have since turned their back on it: there are 26 of them for every non-religious person who goes the other way and becomes a churchgoer.

But if the statisticians, pollsters, number-crunchers and data harvesters are telling us one thing, our own inclinations are clearly telling us quite another. The hope espoused by some church figures, that we've reached “peak secularism” and the tide will eventually turn, seems fanciful. Yet there's something about Christmas which causes even arch-rationalists and atheists to embrace, if only for a day or a few hours, a facsimile of that spirituality they otherwise scorn. They hold their noses but they sing along.

Perhaps it has something to do with envy, which is, ironically, one of the seven deadly sins. The power of assembly is strong when it's hitched to a spectacle – it's why we turn up to football matches, theatre performances and concerts – and there are few more potent expressions of community togetherness than a colourful Christmas service. Who wouldn't want to share in that ... and then feel a smidgen of regret that the full weight of the event's symbolism was denied to them?

Others might just like the tunes. In the same way as you can appreciate Michelangelo's Sistine Chapel frescos without having a religious faith, so can you enjoy a Requiem by Mozart, or the sacred polyphony of a church mass by Renaissance composer William Byrd, or the annual Nine Lessons And Carols, broadcast live from King's College Cambridge. Or even just the sight and sound of your children's primary school class singing Once In Royal David's City, or mugging their way through a nativity play.

Coming so close to the year's end and having as its themes birth, hope and celebration also makes Christmas a convenient time to take stock and reflect. Neither of those activities need necessarily involve a consideration of spirituality, but you can be fairly sure the Mind, Body and Spirit section of book stores are busier at this time of year than at most others.

Then there's all the Christmas add-ons which complete the sensory feast: the lights, the food, the generosity, even the transportive effect of walking into your living room and smelling real pine needles rather than the scent pumped out by those plug-in air fresheners.

Then again, how firm a hold on their secular beliefs do “nones” and “non-verts” actually have? In an article for ideas-driven online journal The Conversation, New Zealand academics Brittany Cardwell and Jamin Halberstadt point up the difference between what they call “explicit” and “implicit” attitudes, the first being ideas people can call to mind consciously, the second being subconscious attitudes of which they have little awareness. “Even if you don’t believe in Christ or a God, religion can still be a powerful force,” they write. “Research shows that even non-religious people may hold unconscious beliefs linked to religion that can affect their psychology.”

Importantly, research suggests that effect isn't benign. Studies have shown that when there is a discrepancy between “explicit” and “implicit” attitudes, the result can be what psychologists call “cognitive dissonance”. This in turn can lead to a higher likelihood of depression and low self-esteem. Perhaps our willingness to buy into the spirituality surrounding Christmas is a response to some unconscious need for equilibrium. Ask yourself this, too: come Twelfth Night do you take down your Christmas tree and park it on the pavement because it's dropping pine needles all over the carpet – or because of a superstitious fear that bad luck will befall you if you don't?

Of course it could be that the appeal of Christmas taps into something completely different, something only notionally connected with established religions but which has deeper roots in pre-Christian traditions and a very different sort of spirituality. After all, the festival of Christmas supplanted an older, pagan midwinter festival tied to the solstice, which in turn spoke to the privations of winter and the need for communities to pool resources and pull together in order to survive. Thanks to global warming and central heating our midwinters aren't as bleak as they used to be, but maybe our near-universal acceptance of the Christmas spirit has nothing more complicated than this at its core: a primal fear of the dark.