Shunning works in human societies in general. The degree of shunning may differ, however. Ever fallen out with anyone and vowed to avoid them at all costs? Ever wished that a charlatan tradesperson was banned from trading? Ever wished the damn kids would just shut up and go away?
Complain all you like, but as a way to treat people, shunning works! And contrary to what you say, some do return to the witnesses and actually state that the shunning helped them come to their senses. Yes, yuk!
As much as I disagree with the JW version of shunning, it's kids' play compared to the murderous things that have been done in the name of religion over the centuries and are currently done.
Live in an Arab country? Try leaving the Muslim faith. Get the point? Female and live in India? Your Hindu parents will be arranging your marriage even before you're 10.