I’m not speaking in support of the ending, but I think it’s a really great plot when the characters shift from “good” to “bad” (and vice versa). It creates this interesting conflict when you love them then hate them or when you hate them then have to reconcile that they aren’t so bad.
I think Jamie Lannister managed to cover most of that single-handedly.
.
Dude went from cold-blooded child killer and king-slayer, to having his hand cut off and risking his life to save his captor (as well as revealing the circumstances behind the king-slayer), to raping his sister, to saving his brother's life (and getting his father killed), to rescuing his illegitimate daughter, to turning against his sister to take part in a battle that was more than likely to end with his death, and then running back to his sister
.
Dude went from cold-blooded child killer and king-slayer, to having his hand cut off and risking his life to save his captor (as well as revealing the circumstances behind the king-slayer), to raping his sister, to saving his brother's life (and getting his father killed), to rescuing his illegitimate daughter, to turning against his sister to take part in a battle that was more than likely to end with his death, and then running back to his sister