It's a decentralized solution to a decentralized problem.
Not everyone has the self control to avoid the comments in the first place.
Not everything you've seen can be erased and forgotten (there's a reason NSFL exists).
Do you honestly believe that is the best method to improve discourse?
A) Who said it's my answer?
B) Just because I listed corporal punishment, it doesn't mean it's the only one form of punishment used.
That how society works, especially for kids. Kids are jerks to each other. After a childhood of interacting with jerks, we learn what we can and cannot say. We react to stimuli. A huge chunk of these stimuli is negative, i.e. a form of punishment.
Does it improve discourse? I believe it does, not all of it is negative. It forces us to learn and to better ourselves.
Obviously it shouldn't be the only form of interaction. You also need the carrot, not only the stick.
But the internet proved that the "stick" is there for a reason. You either have a "carrot" for everything (impossible, and also doesn't work, since people get used to rewards and become desensitized to them after a while) or you need at least the threat of a "stick".
On the internet however, there's no real sense of human interaction and the repercussions are usually minimal.
Real life trolling is probably 1/10k of internet trolling.