If a show is making money, they renew the show even if it's stupid and embarrassing, like all the reality crap around these days.
See also: The Big Bang Theory
NBC didn't want to cancel it -- They just had trouble affording to keep it on the air because its ratings weren't as strong as they'd like. This is what people tend not to understand about network renewal/cancellation decisions -- they're not about wanting or liking, they're about money.
I understand that. Perhaps a better way to phrase it would be to say "There were some NBC executives who wanted to cancel the show because they had little interest in the inherent artistic value of the shows they were producing, but were more so motivated by the monetary potential of their prime time programming."
But that's kind of needlessly long...