Probably the most famous examples are the strips where the creator said, "Okay, I'm done." Peanuts, Calvin & Hobbes, Far Side, Boondocks... They said what they wanted to say and decided that they wanted to move on. In Charles Schulz's case, that was after after fifty years; in Bill Watterson's case, that was after ten years. Regardless of the timing or the reasons, the creator decided they didn't want to work on the strip any more.
Then you've got strips that were given a chance, but failed to ever attract many readers after maybe a year or two. There are tons of examples of those, but you probably wouldn't recognize any of them because they came and went so quickly. Rhinocerous Boys ran for just over four months; Spendawad, the American Indian barely lasted three. (Spendawad ran in 1910, so I doubt it was canned on the offensiveness of the name and/or premise.) There are hundreds, perhaps thousands, of examples like this.
Then you've got strips that ran for a number of years and basically ended with the creator's death. Billy Ireland's The Passing Show or Milton Caniff's Steve Canyon for examples. Presumably the thought is that the strip was so tied to the creator's style and ideology that it would be impossible for anyone to really recreate it.
But you ever think about something that you know ran a long time, maybe even beyond the life of the original creator, and was then cancelled? Mutt and Jeff ran from 1907 until 1983; Brenda Starr from 1940 until 2011. Why would a strip like that remain in publication for so long before finally fizzling out?
At some level, you just assume, "Yeah, it's just not popular any more." But my question is more along the lines of: why? I mean, I get that a comic that was created in/around a certain time period could fall out of favor after a while; whatever social cues it was originally meant to reflect might change. A comic created during The Depression might not make sense thematically beyond that period. One developed during World War II might be looked at disdainfully as people tried to return to their "normal" lives after the war.
But if you look at those longer-lived strips that survive over an extended period, you'll see that the have a tendency to evolve and adapt over time. Blondie Bumstead, for example, was originally a rather airheaded flapper, but that was soon discarded as that fad was already on its way out in 1930 when Blondie debuted. Over time, the characters have evolved to reflect more contemporary settings. Beyond just Dagwood getting a computer on his desk and the kids getting cell phones, Blondie herself became an entrepreneur to better reflect the changing role of women in society.
So what happened to Little Orphan Annie or Modesty Blaise? I suppose it would require the study of each strip to find out what exactly happened, but I think it boils down to a set of creators coming to the table who, for whatever reasons, can't marry the concept, theme, and characters of the strip with the norms, styles, and mores of the times. Brenda Starr, for example, remained a newspaper reporter even as newspapers became less and less relevant to readers in the age of television and, later, the internet.
Is that the fault of the creators at the helm when the strip is finally axed? Not necessarily. Some concepts can only go so far. Annie was very much born out of the New Deal era -- that it survived as long as it had surprises me frankly. That Dick Tracy is still around surprised me as well. (Kudos to Mike Curtis and Joe Staton on that!)
One could argue that there's a danger in updating the strip so much that it is no longer representative of the original, but I don't think that's valid. After all, the people who read Nancy when it debuted, by and large, aren't around any more to read it. So why try to cater to them? Make it for the current reader base, whoever that might be. If a strip remains wedded to the original idea, it will eventually look like an aging time capsule, which most readers won't have much interest in.
So whether it's updating the visuals so you're no longer showing tube televisions, or just reflecting the thoughts and ideas of contemporary society, a creator needs to keep updating and evolving the strip if it's to remain viable beyond a decade or so.