It turns out that, although we may love a certain show and watch every episode, we aren't watching it quick enough. Whereas your grandparents had no choice but to watch a show right when it aired or else never see it ever again (keep in mind that reruns used to not be a thing), our DVR-spoiled asses are watching programs days or weeks after their original run. Ad revenues are only calculated from the first three days of views, so once that three-day period has passed, you might as well not even watch the show, as far as the networks are concerned.
Shows geared toward (comparatively) younger viewers like 30 Rock and Community eat up valuable prime-time real estate, and although they have a devoted core audience, that audience is most likely going to watch the episodes later on DVR or on the Internet through services like Hulu, where ad revenue is slashed. It's gotten so bad that NBC is now backing off of making quirky, narrow-interest comedies altogether and hedging their bets on bland, formulaic sitcoms with prerecorded laughter.
And these new, broader comedies have all been smashing successes.
CBS doesn't have that problem -- their average viewers are so old, they fart mummy dust as they happily watch their favorite shows (complete with commercials) the night they air. So we need to either learn to watch our favorite shows while they're actually on television or resign ourselves to an inevitable future of a Big Bang Theory/CSI mashup.