Changing your religion for another or completely loosing your religion and or your belief in god, or turning to an agnostic point of view is really quite a big change. For not wanting to state the obvious, when you change your religion, it changes not just the concept of religion in your mind, but your entire world view, or the way you perceive things work in the universe. How does such an enormous change happen?
I think the stories on this web site would indicate it happenes in many different ways for different people. For me, it was the deeply held belief that I am a good person, or trying my hardest against all odds to be a good person, and that what was happening to me through dissfellowshipping simply was not kind, fair, didn't show love, and not something I would associate with a loving god. Being thrown aside by the religion in this way is what left me open to other ideas. Then only slowly did I start to look around, and it probably took 2 years or so before I was looking at science for answers. In my case, it was a gradual change as opposed to a Eureka moment.