The other thing to consider is that the writers of shows (not all, but most) also take very seriously what they can and can't do with their characters. How far have we taken Ryan? What else can we explore with Christine? Is there any more mileage left out of Peter's story? ... sometimes, you can write certain characters out and bring in new blood and reinvigorate a series. Sometimes, you can't. Sometimes actors want out. Sometimes actors simply won't leave
If the writers feel they've done everything they can with a certain character, they try to wrap that character up and give them a fitting exit. Sometimes they don't. But if you have a show where the story has been told, the energy may be better spent in wrapping everything up.
Based on the post-screening panel discussion of "Crossroads" at the Arclight in Hollywood a few years ago that the in-between-the-lines conversation that Ron Moore and David Eick had with the audience, it was fairly evident that what ended Battlestar Galactica when it did was that they wanted to have the show go for five seasons but SciFi essentially told them they'd only get four. So, rather than drag things out, Moore and Eick decided to focus on wrapping up the show.
Another element to consider: what is the franchise of the show? What's the basic hook that gets you in to each episode? Example: On Buffy the Vampire Slayer
, the franchise of the show was that every week there was a monster to fight so Buffy and the Scoobies would go to the library, then later the magic shop to research the demon of the week and how to fight it.
Depending on the show we're talking about, the franchise of the show may not be sustainable past a certain point -- Battlestar Galactica
would be very difficult to continue after the Colonials reached Earth. But Stargate SG-1 was able to (sort of) re-invent itself after Richard Dean Anderson left partly because as big a part of the show as he was, he wasn't the only
thing the show was about.