This is an interesting point. I was raised Roman Catholic and went to Catholic schools right up until college. Religion is a community builder, I'll give it that. We knew who we were, why we were, and where we were and there was no questioning any of these things. I think that is a good place to start for way more children than not given the gargantuan uncertainties built into the world of even the most secure child. My sense of it is that religion provides a stabilizing force to the mental processes and personality. Mental homeostasis. Religion may be the most adaptive response for a lot of personality types given conditions of high uncertainty. Its not my solution. But once I begin to suspect that the world consists of something other than me and failed attempts at me, I have to admit at adaptive responses that are not my adaptive responses.
Back to my childhood though since oddly enough I've not considered this exact point closely before. Where Catholicism began to fail was once I felt secure to step out of the certainties it offered. Oh. Silly me. Before we even get to that: did my Catholicism ever involve a belief in a personal god? No, no I can't honestly say it ever did. even when I was exploring kaballah and gnosticism in my 20s. So I went through a religious stage even though it had nothing to do with a belief in God. That is interesting, now that I can see it. Would I still use the word religious? I'm not sure I'm entitled to it although I was certainly prone to fits of dogmatism, and the sense of community that religion can offer is amazing. For me the Catholics offered something even deeper: it was family.I went to the same grammer school for 8 years. I knew who these people were and they knew who I was and even when I was rebelling it was against the family. None of it, for me, ever involved any kind of belief in a personal God. The only thing I feel when I contemplate the existence of God is fear. If he's made us and the world the way he has there is no reason to assume that the afterlife--should the existence of God mean that an afterlife inevitably follows--would be better than this. It might be considerably worse. What would I even say to the Righteous I met in Hell? I'm sure I wouldn't even laugh at them because the first thing I'd lose in Hell would be my sense of humor.
I've got to chew on this some more because I didn't have a religious phase yet consider myself to have the benefits of community family and ethical teaching all of which are associated with religion.
OK now that I'm thinking about it some more, I don't think I ever believed in Santa Clause either. Oh ho! So I'm actually claiming that even as a tiny child just old enough to understand the words of the story I never believed in the literal existence of Santa Claus. Am I really doing that? Yep. Why? Simple answer: The way the grown ups talked about Him. They were sending me all kinds of verbal and non verbal cues that they were not being literally true. Yet the holidays are something I remember being joyfully anticipated times of wonder and sharing and love. So in addition to getting the benefits of a religious stage I also got the benefits of a "Santa Clausious" stage even though neither depended on the belief in a personal god or a toy delivering elf.