It wasn't always this way, nor would I call your examples true comedy. True comedy comes out of suffering. Charlie Chaplin could bring you to tears just as well as he could make you laugh. The early TV comedies, like "The Honeymooners" and "I Love Lucy," were based on much more realistic working class couples and families. It was in the 80's that they began to deteriorate into upper-middle-class fantasies - and lost their humor. Some of this was supposed to show minorities in a better light - such as the "Cosby Show" - but by "moving up" they lost their edge. There were a few counter-examples, like the excellent, but short-lived, "Roc" show (hard to find now - there are a few episodes on You Tube).
Now, everyone is talking about "representation" shows like "Insecure." My wife (who grew up in that area) and I were disappointed with that show. It is not "diverse" at all, in that there are no older people or children, just 20 or 30-somethings (Black this time) who don't seem to work, but just obsess over their relationships. Same fantasy, different colors.
Well, I still have Sponge Bob.