This article is a nice (but shallow) reflection on how our sense of morality has changed. Apu is a blatantly racist stereotype, but we didn’t think of the character that way. It’s disconcerting to rewatch old episodes of sitcoms from as late as the 90s and seeing LGBT-phobia, racism, sexism, and domestic violence as comedic. It feels like watching performers in blackface from the 20s and 30s.
In comedy, there’s a difference between punching up and punching down. Punching down is when you have a character with a mental disorder have that disorder being the source of humor. Punching up is when you’re making fun of the powerful. George Carlin was a master of punching up.