By final season of Bewitched things were a hot mess.
Ratings had taken a beating. Both EM and her husband were having or had affairs. EM was doing "Samantha" in most passive aggressive way possible IMHO, this included often not even bothering to wear a bra (so much for proper Conneticut society matron, wife and mother), and on it went.
Agnes Moorehead wanted to do other things so by second to last if not before season Endora was scaled down. Heavy reuse of previous scripts without even serious attempts to hide it... and on it went.
Despite tanking in ratings, yes Bewitched was renewed for a 9th and 10th season, but EM said enough and that time she meant it, period, end of story. Previously when EM wanted to walk she was offered so much money and other compensation the actress changed her mind, but not this time.
One major reason EM wanted out was her desire to do other work besides playing Mrs. Darrin Stephens. Bewitched ran from 1964 to 1972 which was a pretty good run for a sitcom. But many actors then and since often walk away from a hit sitcom out of desire to not being forever associated with role (too late for EM), but wishing to do other things.
There were other cast issues as well. Besides replacing Dick York with Dick Sargent the children (Tabitha and Adam) were getting older, that never bodes well for a sitcom as they either had to be given more story lines or regulated to background. When infants that was easy, but Tabitha had already started school by end of Bewitched.
We know now what no one could then that Agnes Moorehead would die in 1974. Original Louise Tate was shoved out in a power play and of course original Gladys Kravitz had long since died.
Even Bewitched had squeaked out another season or two it's highly likely show would have ended on that note. The "rural purge" of early 1970's television was already shaking things up. Besides rural or military themed shows all the kooky sci-fi/supernatural shows were going as well. In their place came urban dramas (often revolving around LE or some private detective), various variety shows such as Flip Wilson, Carol Burnett, and of course sitcoms such as All In the Family and its spin offs (Maude, the Jeffersons).