I would argue that the primary function of religion is to provide a community of shared meaning, values and practice. Belief is secondary to these functions. Of course fundamentalists' explanations of how the world works (both morally and physically) are way off reality as evidenced by scientific research, personal experience, and any sense of spirituality.
The article suggests:
The reasons that churches lose ground in developed countries can be summarized in market terms. First, with better science, and with government safety nets, and smaller families, there is less fear and uncertainty in people's daily lives and hence less of a market for religion. At the same time many alternative products are being offered, such as psychotropic medicines and electronic entertainment that have fewer strings attached and that do not require slavish conformity to unscientific beliefs.Not all religions require "slavish adherence to unscientific beliefs". The liberal and mystical tendency in religion has been questioning dogma for centuries. In the West, this questioning has resulted in four great liberal traditions: the Society of Friends (aka Quakers), the Unitarians, liberal Judaism, and the Pagan revival (which includes various traditions). None of these traditions requires adherence to a creed or even belief in God(s). They are about exploring the meaning of life (drawing on both secular and sacred sources of inspiration) among a community of shared values. In Islam, the mystical tradition of Sufism fulfils a similar role; and Buddhism, Sikhism and Hinduism are similarly diverse and include liberal perspectives. Please do some research before dismissing all religion as irrational and dogmatic.
The second aspect of this argument, that religion is about providing reassurance in an uncertain world, depends on what is meant by reassurance. Liberal religion provides the reassurance of having a community of shared values and interests, but it does not provide reassurance on the subject of life after death. Liberal religion is about enjoying being alive now, not about a future existence which is very uncertain.