With Dany, you just have to kind of assume the family madness caught up with her and her actions were not based on her convictions but on mental illness. Still a pretty crappy way to end a story, even if that's how GRRM plans to end it. Like a reverse deus-ex-machina. In a heroic story characters' fates shouldn't be based on factors entirely outside of their control. (In real life yes, but we have fiction for a reason.)

There WAS foreshadowing that Dany might be going in that direction, and the murder of Missandei may have pushed her over the edge. So it might have been bad storytelling, or it may have been a bad story told well.