After three years a show has enough episodes to be syndicated and the contracts with the main stars have run out. If the show is doing OK but not great the easy option is to cancel it and sell the rights rather then pay the stars the money they should get based on how well the show is doing.

Network execs tend to move around a lot so there are also cases where a exec that said a show would never work is now in charge of the part of the network the show falls under. Instead of being proved wrong they'll kill it by playing games with the schedule.