Cancel culture has become a powerful and sweeping force within the media. As people become more aware of racist and bigoted tropes within shows and movies, there has been a concerted effort to re-evaluate many beloved properties and see where certain storylines or characters may have crossed lines that are no longer acceptable. Many shows have been “canceled” either due to the content within the show, or the real-life actions of the creatives behind it. But as people become more sensitive to offensive humor, one show has managed to survive this era unscathed, despite its offensiveness— It’s Always Sunny in Philadelphia.

It's Always Sunny... revolves around the Gang, a group of degenerates who own a bar in South Philly. Mac, Charlie, Frank, Dee, and Dennis are simply put, some of the worst people you will ever see on TV. But somehow, this show about awful human beings treating other humans awfully has managed to stay on the air for 15 years, with its upcoming season set to break the record for longest-running sitcom in television history. At face value, this seems baffling given how fired up people are to see improvements in media.

RELATED: Netflix Pulls It's Always Sunny in Philadelphia's Blackface Episode

But the reason for It's Always Sunny...’s continued success is not that hard to explain— the writers don’t glorify the gang for their awful behavior, they punish them. Every episode is an exercise in schadenfreude, where the viewers watch the Gang try to hatch some half-cocked, dangerous, and nearly always offensive scheme, only to have it blow up in their face. Season after season the characters’ unending plans are foiled by the functioning members of society who are universally repulsed by the Gang.

The gang in the supermarket in Always Sunny in Philadelphia

We are meant to be laughing at the Gang, not with them and the writers make that perfectly clear. That’s not to say the show hasn’t ever gone too far. Writer and star, Glenn Howerton has expressed regrets over the use of slurs against the mentally handicapped. In fact during the episode “The Gang Does a Clip Show,” the only word censored was that slur, every other profanity made it through.

The show also had some problematic homophobic storylines early on involving a transgender character. However, they have taken great steps to rectify this— with main character, Mac going through over a decade long arc where he confronts and ultimately accepts his homosexuality despite his confounding and contradictory religious beliefs.

Mac coming out to his father via a dance routine in the Season 13 finale was a shockingly sincere and affecting moment in a show which contains an episode titled “Who Pooped the Bed?” Mac’s actor and series creator, Rob McElhenney was raised by lesbian mothers and is very aware of the struggles LGBTQ people face. While not initially planned for the character, Mac’s arc has done a lot to rectify the show’s past mistakes in this area.

RELATED: Riverdale's Bernadette Beck Slams Show - 'I Was Just There to Fulfill a Diversity Quota'

Likewise, the show has confronted the rampant misogyny the gang displays, and while the characters may not have changed much, the writers are definitely calling them out on their behavior. Dennis has long been depicted as a sexual predator (and possible serial killer), who over the course of the series has only become less successful with women as his type of behavior is now being ridiculed frequently. Even more sympathetic characters like Charlie have been chastised for his obsessive and intrusive stalking of the Waitress.

The show brilliantly laid bare the gang’s sexism in the episode “Time’s Up for the Gang,” where even Dee, the Gang’s sole female member was singled out. She abused the victimhood of other women by falsely accusing men of harassment to do things as trivial as cut ahead in a buffet line. She also operated on the false assumption that women can’t rape men, but learned that she had in fact once raped Charlie.

Frank, played by Danny DeVito, remains the most unapologetic and offensive character on the show. Not only has he learned almost nothing over 14 seasons, but the character is actively striving to become as much of a degenerate as possible. He has been quoted saying “I don’t know how many years on the Earth I have left, but I’m gonna get real weird with it.” His character is bigoted in every possible way, showing particular disdain for Jews and women. But even for the rest of the gang, Frank is way too much. As the series progresses the Gang continually attempts to correct Frank on his incredibly offensive behavior to no success.

RELATED: Hasbro Pulls Trolls Doll Following Complaints It Grooms Children for Sexual Abuse

The fact that the writers make it clear that both they and the audience they are writing for are more intelligent and caring than the Gang has long been the show’s saving grace. But that has not kept It's Always Sunny... from occasionally going too far— especially in regards to race.

Many shows have seen retractions and apologies following the outcry against the use of blackface, something It's Always Sunny... is guilty of as well. Two episodes featuring blackface have been pulled from streaming services: “Dee Reynolds: Shaping America’s Youth” and “The Gang Makes Lethal Weapon 6.” Though many of the other shows that have had depictions of blackface were unintentionally offensive, the use of blackface in It's Always Sunny... was purposeful and used to show just how messed up the practice of blackface is. That still doesn't quite overshadow the ugliness of using blackface in the first place.

Those episodes also showed that it wasn’t only blackface that was an issue. When Dennis switched roles with Mac after objecting to his use of blackface, he may have had white skin, but he spoke in a racist imitation of a black man’s voice. The show has made strides to approach race from a more inclusive angle with episodes like “The Gang Turns Black” in which the Gang experience a day in Philadelphia facing the discrimination Black people endure their entire lives.

Since the show began, It’s Always Sunny in Philadelphia has pushed buttons, unafraid of finding humor in the ugliness of the Gang’s actions. But the show has never lost sight that these characters are terrible and at no point have they presented them in a heroic or aspirational light. Their ability to walk the line of offensive-yet-insightful has been a large part of what has kept the show on the air for 15 years and mostly remain held in high esteem by their viewers.

KEEP READING: Netflix's The Order Has a Major Diversity Problem