I can't find the compilation now, but someone put together all the scenes over the years where either Dany or someone else foreshadowed her going crazy and burning everything. So if one could actually recall all those scenes, one shouldn't be surprised by her actions. What the writers fucked up though was decompressing and evolving her descent into lunacy, but since they tried to jam too much plot into too little time, it all comes off as jarring and unbelievable.
They probably didn't quite sell the trigger properly. Even those of us saying, "yeah the seeds have been there all along. She just needed something to push her one way or other.", would probably have a hard time saying exactly WHAT set her off here.
like, you can go back in this thread to last year, and see the discussion about losing a dragon, or her dragons setting her off.
or, you can go back recently, and see the talks about all her Hands and advisers failing repeatedly, after they talk her out of going scorched earth. So, she has been getting more and more frustrated with the lack of winning in Westeroes she had in Essos.
Like I would say best guess for what exactly set her off here, was, this was her end goal, her entire lifes goal... and surrendering took it away from her. Thats not how she wanted it, not how she wanted to win. A whimper.
There is also the obvious narrative arc. Fairytail princess wins, wins wins, wins, and wins her throne back, and everyone lives happily every after. Did anyone think that was going to happen?
So either Dany was going to bite it, or Dany was going to be a threat, not savior. People had been calling it out, just for that alone.