I think that's because the Internet sucks, and LLMs are trained on that crap. For example, I notice that almost every time a professional female comedian posts anything on social media, the comments are filled with guys saying "that's not funny" or "no women are funny", even for women who regularly sell out large venues on their tours. If you inject all that as training data of course your model is going to "believe" the same thing.
I think this might be related to AI's difficulty related to contextualization. If I imagine Chris Rock or Kat Williams delivering these lines it almost works.
Was racism taboo when minstrel shows were popular? I don’t think it was…
There definitely are jokes that play with taboo subjects and derive the comedy from the sudden shock of the taboo thing. But other times people seem to just want to engage in the taboo for its own sake.