Right? Shows changing showrunners and maintaining the same level of quality (The Simpsons, Angel, Stargate SG-1, Ash vs Evil Dead, Superman: The Animated Series/Jusitce League/Justice League Unlimited, The West Wing, Doctor Who) are exceedingly rare, and these examples are very much the exceptions to the rule. Generally speaking the original showrunner leaves and the series turns to shit. Then there's that rare unicorn of a show like Star Trek: TNG that's shit but has promise, and the original showrunner is replaced by someone that actually fulfills that promise.
Generally speaking, though, the answer to the question "Why did ER/M*A*S*H/I Love Lucy/Dexter/Buffy/Xena/Twin Peaks/The Office (US)/Prison Break/Gilmore Girls/etc. suddenly turn to shit?" is inevitably "The original showrunner left."