In answer to your question... by indoctrination. I'm thinking right now of my Mormon friends and their five adult children, the older ones of whom are about the same ages as my eldest two daughters (late twenties/early thirties). Those kids were totally immersed in indoctrination to the point of hardly mixing with anyone who wasn't a mormon. They were taught, without knowing it was happening, to close their minds to anything that questioned what their church told them. I saw this while the mother was trying to convert me. It was fascinating, but frightening to watch. This is fairly extreme, I admit, but it's what ahppens to varying degrees within all religions. It's indoctrination.
Of course, I do not know what your story is, lily. I'm sure you are a thoughtful person. All I know is that I was most certainly indoctrinated as a child (catechism, for a start, from the age of four), and it was extremely difficult to break out of the bindings. It might have been easier of people hadn't got angry and upset about it but they did. From what I've heard and read, that's common.