The Mad King himself never "burned them all". Don't believe he even decided that was a good idea until it was obvious he had been duped into opening the gates and Tywin was coming for him and sacking the city. He pulled some cruel, stupid stuff. But he never burned a million people for kicks except when it was time for him to die.
I know people do not stop to attempt to play out motivations in their heads much overall, but the plot has just gone full retard. "Hey, she's got dragons. Let's huddle up right beside the castle she came here to burn". "Yep, it's definitely the safest place." I know the smallfolk aren't educated in the story persay, but they must have a lot of street sense in order to survive in Flea Bottom. Street sense says GTFOOD. Hell the forgotten Dornish had shown how to resist the dragons for hundreds of years. You don't be there when they arrive. Bronn is the only one they've allowed to retain good walking around sense on the whole show.
Congruent with Dany's character would have been to torch the gates to KL and the gates to the Red Keep for her army to enter at whatever cost that came along with that. And light up Cersei. And if you've got to take down the city, then have the wildfire she doesn't know about take out the city and feel tremendous guilt about that. In fact, thinking about it now, the wildfire should have been the actual plot reason not to light the joint up with her Drogon precision guided missile.
Or better yet, how about this: You setup the hunger siege exactly as discussed in Winterfell. You tell all the smallfolk to get out of the city and give them a timeframe to do so while promising to provide them with food and shelter. This will tell Cersei when the attack is coming, but it's not like she didn't know it was coming when it actually arrived anyway. Cersei will bar the city shut trying to retain her civilian safety net. You torch the walls. And you give a fair period of time for evacuation. You give the innocents a chance to escape your utter decimation before you burn it all down.
I get it -- she lost her ****. Good guy gone bad. And there's no "good" way for a "good guy" to commit terrible atrocities.