Maybe a societal foundation of: magic man in the sky - wasn't so great a foundation after all?
But the fact that they rest on an arbitrary belief in one of the popular gods does make it a pretty shakey foundation.
We see it right now, as the belief in Christianity has dwindled so too have the communities the church was supporting, the community can be separate to belief and probably should be of it is to support a greater community.