The short answer is that we are made that way. Hundreds of thousands of years of evolution have left their imprint on us: we are social animals. We need to belong.
Belonging has been a survival instinct for us and our pre-human ancestors. Ostracism, or even the threat of it, has always been one of the most powerful tools of control of social groups. This dates back to our tribal past.
It is an interesting sociological question to ask: Why do some people leave a group when the personal emotional cost is so high? This is something I've been pondering and researching for a couple of years now. The answers I've found are not so clear-cut and are largely anecdotal. One this is clear, there is only a weak correlation between intelligence and cult involvement. There are highly intelligent people that join cults and remain in them their whole lives. Conversely, there are individuals of less than average intelligence that seem to somehow be resistant cult propaganda. Interestingly, some studies show that creative people are actually more likely to fall for cult beliefs!
What does seem to make the difference is that people that leave high-demand, authoritarian environments (that's academicese for "cults") tend to be more personally self-aware of their own thoughts and motivations and have a higher commitment to self than the group. Additionally, they possess sufficient personal integrity and courage to live separately in spite of the emotionally painful consequences associated with leaving.
I also suspect that many that leave a cult naively think that somehow their ties to their family is so strong that they will be the exception and their loved ones will not shun them when they leave. Agains, it's anecdotal evidence, but my personal experience has been confirmed by reading the stories of literally hundreds of JWs that have left the religion.
So many people think that if they "just fade" their still-in families will continue to treat them as before. Although it does work out positively for some few, the majority seem surprised to find that they are cut-off completely simply because they no longer "go to meetings."
To add another perspective to this thread, it's not just painful when parents shun their children, it is also very difficult when children shun their parents.