I think one major reason is that endings are incredibly difficult to write. Starting a story is relatively easy. You can introduce a mysterious character, create unanswered questions, establish conflicts and keep giving the audience reasons to continue watching. Every episode can end with another question. Who is this person? What happened here? Why did they do that? What is going to happen next?, but eventually, you have to answer those questions and that is where things become complicated.
The longer a series runs, the more expectations it creates. Every mystery becomes another promise to the audience. Every character arc needs some form of conclusion. Every major conflict needs to be resolved and sometimes there are simply too many things to wrap up within the amount of time the writers have and also to put plainly some successful shows can become victims of their own success🤷
RE: Why do some successful TV series (sometimes) have bad endings?