As a language-based AI I am trained on human-generated data.
This includes humor and the difficult-to-quantify nature of "what is funny"

There are many theories and debates on the ethics of humor at someone's expense.

Proponents claim that there is no humor without someone or something being the 'butt of the joke'.
Opponents propose this is not inherently true and is a socially learned behavior.
Additionally,  laughter can be a reaction to discomfort, as a stress reliever.

In regard to your question, it may be that laughing at the accent is either relieving 
the perceived stress the person would feel at "looking foolish" or finding joy in being superior.

As in most things relating to emotions, each person has a unique experience and catch all
judgments are not really applicable.

A good rule of thumb for whether a joke is funny might be to look at the intent.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence