In order to get my records at least flagged as no longer a Mormon, thus to keep random visits from local congregations from occurring, I had to get a lawyer involved.
In order for my children to not be repeatedly hounded by some parents at school to come back with their kids over the weekend so they could attend the local congregation, we needed legal action.
I didn't speak out or speak up vocally when I left. I just stopped going to the local congregation. Not a single person there chose to continue friendship. My wife attended a few more years, and had to constantly deal with rumors that I had an affair (I did not). When we moved and I was no longer known to the new congregation, she had to deal with the the local leadership trying to instantiate romantic relationships with widowers and unmarried gentlemen in the congregation because they assumed I was either dead or because since she still attended our marriage was on the rocks.
My story is not unique, and I can say with confidence that the social pressures on the members result in them feeling justified performing actions intended to take away dignity of former congregants ("apostates").