If we look at populations where the majority are irreligious, we don't see that they "lose their reason to be good". It's a deeper thing than religion. Estonia is over 70% irreligious! My own country is in theory about 50%, I suspect it is higher in practice.
Yet St. Olafs church is one of their biggest landmarks. The rest looks like mansions. What did they do to all the poor people?