This topic is vague and open-ended. I'm leaving it that way deliberately. Perhaps some interesting, better defined topics will grow out of it. Or perhaps it's too far afield from the concept of less wrong cognition to be of interest here. So I view this topic as exploratory rather than as an attempt to solve a specific problem.
What useful purposes does religion serve? Are any of these purposes non-supernaturalistic in nature? What is success for a religion and what elements of a religion tend to cause it to become successful? How would you design a "rational religion", if such an entity is possible? How and why would a religion with that design become successful and serve a useful purpose? What are the relationships between aspects of a religion, and outcomes involving that religion? For example, Catholicism discourages birth control. Lack of birth control encourages higher birthrates among Catholics. This encourages there to be a larger number of Catholics in the next generation than would otherwise be the case, Surely there are other relationships like this? How do aspects of religion cause them to evolve differently over time?
Religion serves numerous purposes, some of which have been mentioned already by other commenters. I want to add two others:
1) a mechanism for preserving Intersubjective Truths, that is, truths that it is not possible to re-derive from first principles in a reasonable amount of time.
2) a connection to the spiritual side of life and spiritual experiences.
Also, with so many different purposes it is tempting to design different religions to fill all these roles. I suspect that is harder than it seems. Since whatever fills at least some of these roles will attempt to expand to fill all of them.
In the real world I don't see that any religion tries to fill the same roles. Christianity doesn't try to expand to fill law-making in the same way that Islam does.