
It is called a self-fulfilling prophecy, the guy in this case, and in the case with the bald spot, assumed that you were going to be judgemental and rude about that flaw, making him mean to you, which then prompted you to be upset (rightfully) which confirmed in his head that he was right to assume you’d be rude
It usually starts because someone gets made fun of a flaw in the past so they assume that other people, when put in similar scenarios, will humiliate them too. It’s a reflexive defense mechanism, a bit of understanding or comforting can usually assuage the insecurity and get them to calm down