It leads opponents to underestimate the ability and intelligence of the buffoon.
It provides deniability — “it was only a joke.”
It appeals to core supporters
It serves as a distraction from the more serious, perhaps frightening or incompetent, actions of the leader, what we now call the “dead cat” tactic.
It leads to ambiguity (was it a joke or not?), producing confusion and uncertainty about how to respond.