Nobody expects this to convince anyone. That’s why I don’t like the term “ad hominem”, which implies that shamers are idiots who are too stupid to realize that calling someone names doesn’t refute their point. That’s not the problem. People who use this strategy know exactly what they’re doing and are often quite successful. The goal is not to convince their opponents, or even to hurt their opponent’s feelings, but to demonstrate social norms to bystanders.
Hm, I'm surprised nobody has mentioned the evidentiary reasoning version of ad hominem, something like "you seem to have a bad character, so I'm going to assign low weight to anything you say". I use this rule all the time. Ie, I'll give more weight to statements made in a reputable scientific journal than those on a Nazi website. This is not a valid argument againt anything on the Nazi website, just a rule that says not to pay too much attention to stuff found there, or at least seek independent verification from a more reputable source. There ought to be a fancy rhetorical term for this...there is for the opposite. Authority of sources is an important and under-described part of practical reason, and attacking the authority of a source is a pretty common form of argument that is quasi-ad-hominem but valid.