Insanity has no logic. You could see parts of the insanity in Dany as early as Season One. Watching passively as her douchebag brother is given a golden crown. Having the young dragons fry the Wizard. Allowing the Dothraki to sack Qarth. Roasting the leadership of the Dothraki so she could take it over. Crucifying the masters in Mereen. Roasting Lord Tarly and Dickhead.. err. Dickon. Her madness grows as her power grows.
Cold blooded killing, no remorse. Using fire just as the Mad King did to kill.
Now... Jorah Mormont who betrayed her, then salvaged himself and dying for her. Jon Snow snubbing her vagina. Varys betraying her and getting roasted. Missendei being whacked. Except for the balless wonder, Grey Worm, she has no one. And she knows her family line ends with her since Jon is a wimpdick and she believes she can't have kids. The last Targaryen.
Great, she will rule with only one dragon to keep her company, not loved by any, no discernible line of succession ... So it's "Fuck it... burn 'em all." She is sitting on the dragon, looking out over what she had fought for her adult life... achieved it, then realized she has nothing. They could have had her love, snubbed that so now they will fear her. And the manifestation into Aerys the Mad King becomes complete. But she succeeds where he failed. And King's Landing is torched.