For me, it all boils down to milking the cash cow. Squeezing it dry until there's nothing left to give.
Big productions try to stretch them out to keep the audience engaged, so they delay the ending again and again, and in the process, they make bad decisions that ruin the story. Such is the case with Dexter. Its later seasons were a decline in every way; they even released a one-season prequel, and now they're on Dexter Resurrection. I've watched them—a guilty pleasure—but they ruined what made Dexter so wonderful in its first three seasons.
Lost is another case, but there you can see that the creators didn't have a planned ending, nor did they know how to finish the story. They simply added outlandish things and saw how they fit into the series' mythology.
RE: Why do some successful TV series (sometimes) have bad endings?