In the case of Rob Morrow, “Northern Exposure”, for all due purposes, was nearing the end of its run anyway. The tried to reboot it with a new doctor and his wife but the show was already creatively exhausted.
As for Shelley Long, people now say that her decision to leave “Cheers” indicated proof of an unsound mind but, as you said, that picture was not so clearcut in 1987. At the time of her departure, she had just starred in a hit movie, Outrageous Fortune, and had done solid work in some films prior to that. Granted, she wasn’t as popular as Eddie Murphy (who was the #1 box office star at the time) but her future as a film star certainly looked a lot brighter than that of Bruce Willis who was also trying to parlay his TV fame into a movie stardom (and mostly failing).
In my opinion, there were two things that really killed Long’s career: (1) Her reputation as a difficult performer (which was further enhanced by horror stories about her diva-ish demands on the set of Hello Again) and her subsequently getting fired from My Stepfather Is An Alien); and (2) The arrival of Meg Ryan. Ryan was cheaper, younger, and (at the time) more agreeable and could easily do the type of roles that Long had been considered for just a few years before.