The fine line between humour and ridicule. Between actual surprise/relief and confirmation of prejudices.
I would say that “guy with no arms and no legs” falls in a different category, though, as it starts off looking mean, but the puns in the punch line turns the joke into absurd silliness.