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.