If you don't understand how something works, never mind: just give up and say God did it. You don't know how the nerve impulse works? Good! You don't understand how memories are laid down in the brain? Excellent! Is photosynthesis a bafflingly complex process? Wonderful! Please don't go to work on the problem, just give up, and appeal to God.
I think there in a great deal to be said for religious education in the sense of teaching about religion and biblical literacy. Both those things, by the way, I suspect will prepare a child to give up religion. If you are taught comparative religion, you are more likely to realise that there are other religions than the one you have been brought up in. And if you are if you are taught to read the bible, I can think of almost nothing more calculated to turn you off religion.