I think there are just too many variables to know if shunning changes the course of the one shunned.
I believe shunning and disfellowshipping are used as tools by the majority to peer pressure the minority into not questioning or leaving. Not necessarily sinning, because sometimes human weakness just lets that happen, but questioning, doubting, researching, asking questions and trying to convince others they're crazy are all outwardly minimized by the fear of disfellowshipping.
Instill fear and members won't stray (as much).