Dan Harmon should send Charlie Sheen a thank-you note.

Just when the “Community” creator was looking like the biggest ingrate working in primetime, Sheen roars back into the race for the win — if even half of what’s being reported about his role in axing Selma Blair from “Anger Management” is true.

The Blair affair seems to put the lie to all the talk of Sheen’s reformation after his spectacular exit from “Two and a Half Men” in 2011. The tiger blood appears to be boiling again, amid reports of persistent production delays on the Lionsgate TV sitcom because of Sheen’s erratic schedule. So much for the carefully crafted storyline that all Charlie really wants to do is work, and that “Anger Management’s” accelerated 90-episode back order from FX was just what the rehab doctor ordered.

Meanwhile, Harmon’s apology to fans this week for expressing his unvarnished thoughts on his “Harmontown” podcast about the Harmon-free season four of “Community” still rings  hollow. Even harder to swallow is the notion that Harmon didn’t “consider how my words might affect other people if viewed as headlines,” as he wrote in his apologetic blog post. Harmon has clearly worked those broadcast-your-every-utterance levers to stoke the cult of “Community,” and himself.

The antics of Sheen and Harmon stand in sharp contrast to the attitudes expressed last week when Variety gathered a gaggle of comedy and drama showrunners for a yakfest at the Writers Guild Theater. To a scribe, the participants expressed gratitude for the privilege of being on the air and respect for their viewers. Harmon, in the cold light of the reaction to his podcast rant, sheepishly acknowledged his debt to the aud, particularly the loyalists that stuck with “Community”  last season: “I owe you folks what I consider to be my life and guarantee you that every time I’ve pissed you off it’s been on accident,” he said.

The business question underlying all of this is why networks and studios enable such behavior, reprehensible in the case of Sheen, and doltish Harmon. The answer, of course, is commerce. But as Sheen found out, Warner Bros. had its limits for indefensible conduct, even with the money-making machine of “Two and a Half Men.” Harmon got bounced from his show a year ago amid highly charged reports of strife on the set, among other issues.

Both Sheen and Harmon got their second-chance shots by showbiz congloms (News Corp., Lionsgate, NBC, Sony) banking on them to make it worth their while. Sheen can be his own best publicist when he wants to be, and Harmon’s return is a good marketing hook for what is likely to be the show’s final 13 episodes, on NBC at least.

With ratings for “Anger Management” slumping and “Community’s” numbers consistently underwhelming (for all the chatter it provokes), Sheen and Harmon would be wise to not wear out their welcomes, or blow their second chances. Of course, TV’s enfants terrible could always do a podcast together.