Religion is a major factor, that impacts your lifestyle, community, happiness and longevity. In most cases, positively. There are studies proving it.
So yes, most religions if not all are based on unscientific claims, but they make people's lives better.
These are merely correlational studies. Religion often makes people’s lives worse as well: sexual repression, homophobia, religious intolerance, fear of eternal damnation, misplaced guilt/shame, hours wasted on prayer/services/rituals, sheltered upbringings..
I think the underlying issue is whether a person views the objective appraisal of reality as a positive thing or not. For someone who doesn’t, self-deception may seem the better choice.
> These are merely correlational studies. Religion often makes people’s lives worse as well.
I'm not religious, but that doesn't make any sense: those cases would weaken the correlation (or correlate it the other way), and now you're also claiming a causative effect that's opposite to the correlation you don't refute?
I’m not denying it can have beneficial effects but only denying that it necessarily has beneficial effects. That’s why I pointed out that the studies in its favor are merely correlational and why I also list several negative effects it can have (although it won’t necessarily have).
It’s clear that social outcomes always have intertwined retroactive loop with psychological representations.
When we live in a society which publicly announce anyone doubting the dogma is a miscreant who should be tortured through long painful experiments, we will feel safer and better if we are in the camp of the true-sincere-believers™. Indeed it’s far less likely that any of these corrupted souls will come and trouble our peaceful minds. But if we have a ounce of skepticism in our veins, there’s no happy path for us in this society.
In that case, why is that the most rich and developed countries are secular and not religious?
You would expect a population with "better lives" to outperform the rest.
Not OP but perhaps you could consider Manifest Destiny and Capitalism as a religion?
Protestant Scandinavia and Calvinist Netherlands and Switzerland never really consider(ed) Manifest Destiny nor Capitalism as religions. And both regions are becoming increasingly atheist.