I'm sure that depends on whether you believe religious impulse is a fixed and constant feature of the human psyche that requires some outlet, or whether you believe it is variable based on some set of environmental factors.
To give an example of how this could manifest: it could be that religious impulse scales with material uncertainty and is also passed down in the family environment. Under a construction like this, you would expect religious impulse to begin fading among families where there is a certainty of sufficient food and shelter, with the fade occurring over the course of multiple generations. I'm not saying this specifically is the case, just proposing one mechanism that is broadly consistent with the shape of history.
I think that a lot of people feel the need for moral certainty in their lives, and that some of them aren't satisfied with personal models thereof and want to extend them to the entire society, perhaps minus some loathed outgroup that plays the role of the Devil.
To give an example of how this could manifest: it could be that religious impulse scales with material uncertainty and is also passed down in the family environment. Under a construction like this, you would expect religious impulse to begin fading among families where there is a certainty of sufficient food and shelter, with the fade occurring over the course of multiple generations. I'm not saying this specifically is the case, just proposing one mechanism that is broadly consistent with the shape of history.