In psychology I believe there is a term or theory for this. Self confidence is basically linked to the ability to win admirers atc. and as humour wins more admirers than anything else, this can naturally make one so confident of his/her ability, it leads to smugness. Sometimes to the extent it can turn people off, as many turn me off.
Clever comedians have sought to find a way around this drawback and still be very popular, cue Woody Allen, the Godfather of self deprecating, non smug comedy.