Public shaming is punishment without due process. It turns justice into a popularity contest where the loudest crowd gets to play judge.
Plus it's permanent in a way real punishment isn't — courts have sentences that end, but the internet remembers your worst moment forever.