I remember that old scripture "Train up a child in the way he should go, and when he is older, he shall not depart from it."
The lesson I took away from that is if you raise a kid with correct practices early they tend to see the self-evident truth in them and keep them going, since best practices are buttressed by the force of early training.
Attitudes are more complex. But I like to think that if we teach people the things that are mostly correct, or at least functionally useful, they sort of linger and don't have to be questioned and re-thought, later in life. That's not to say it's always this way; sometimes those things also need to be deconstructed. But generally, if you learn it right, you don't have to reappraise everything because you've been handed a series of practices that are useful enough that they serve well for the eighty or so years that you're on earth.
So, where I'm going with that is this; I was a serious Christian kid and drifted away from the church right around the time I first began to attend college. I know that a lot of people in my church viewed college as an agent of leftist, atheist indoctrination -- because SO MANY kids begin drifting away from the faith the moment they get there.
Except... well, that's also right around the time they escape home for the first time, isn't it?
I always thought it was a gentle irony that so many Christians, seeing their children drift from the faith when they leave for college, assume that the problem is college. As opposed to... y'know... questioning whether or not they actually, really, truthfully, raised their kids up in the way they should go?
Maybe they didn't. And once the kid got out they began looking for the way they should actually go. I'm not saying we all find it. But there's clearly a reason we are so eager to seek.