We live within a world in which far too many people engage in behavior with others that doesn't take into full account that each person has value, and that therefore how we treat one another, has consequences, good as well as bad. The problem with something such as shaming, or the belief that when a particular person engages in bad behavior that they should be ashamed of themselves, is that this doesn't often produce any real lasting change in that person's behavior, but rather more often serves to make that person more socially withdrawn, especially when that shame comes through an authority figure, such as a teacher, parent, or mentor, in which that person so shamed often loses some degree of their own self-belief and self-worth. After all, when an authority figure tells someone, in so many words, that they are worthless in some aspect of their personality or behavior, many people not only believe it, implicitly; but also in absence of any constructive suggestions or help, believe that they will not readily overcome that which they are told to be ashamed of.
Further to the point, all shaming done in which a stranger attempts to shame someone else for behavior that they don't approve of, such as, for instance, not properly "social distancing" or whatever, isn't often going to produce any change in that subject's behavior, but typically will result in contempt for that other person, and for what they believe, because most people do not appreciate being essentially bullied by somebody else, and therefore won't readily be obedient to them. In truth, social shaming, may perhaps work on some people, but only typically in the sense that they will modified their behavior to subsequently be more discreet or secretive about that which they are being shamed about. In other words, if the purpose of shaming is to help people, to correct that which appears to be incorrect, shaming is not the appropriate way to do so, for it serves more often, to exacerbate situations, rather than to resolve anything of substance, meaningfully.
The main thing about the act of shaming, is the fact that it doesn't require much aforethought to do; as opposed to actually taking the time to take in a given situation and then come up with something of merit to address what appears to be behavior that would behoove the person so exhibiting such, to improve upon. After all, behavior which appears to be inappropriate or wrong, typically has some sort of root cause that is enabling such, and a considerate person, therefore, desires to see that the root cause is dealt with in a manner in which by doing so, that person improves their own outlook and their own life.
The bottom line is that shaming is the go-to choice of all those that do not have the time, or do not care to take the time, to address what is actually happening with another person in a responsible and mature fashion, but prefer instead to strike out against that other person, because they themselves are typically impatient, uncaring, or self-centered. Those behaviors that some people do that upset other people so much, are best addressed in a manner in which we should more often take into account, that sharp angry words stir up ill feelings; whereas, kind tolerant words command respect.