Regarding your question in the last episode about how the show can be surprisingly wholesome at times (esp. with Michael): The answer may simply be that the show has a lot of subtle and not-so-subtle funny negativity in it most of the time, and that it later gives you a strong dose of uplifting positivity out of nowhere that feels refreshing. I think that's what the formula of what you were talking about boils down to. The rest is good writing and acting.