They could have handle Daenarys heel turn much better, but overall I don't feel that it was out of nowhere.
Remember, through most of the series, Daenarys fucked up things a lot of times, but she managed to find solutions to those troubles most of the time by using fire against her enemies. Is true that first it was justified because she used it against slavers, bandits, rapists and the likes, but you have to wonder what would happen when someone innocent annoyed her, at first it was against the war prisoners, which again, were not exactly good, but by that point there was no reason to kill them, and now Daenarys paranoia and insecurities led her to believe that all the people in Westeros hated so there was no other solution for her than use the dragons, the only thing that helped her get what she wanted for most of the series.
I think that the main issue with the series is that the portrayal of the commoners has been for the whole series godawful, we rarely see their point of view in the series, unless the message in the series is that all commoners are sheeple and that their opinion doesn't matter