She was tempted by such acts of brutality many more times than she actually got to enact too. Her council had to talk her round on more than a few occasions.
As you've said its all about the framing.
Those times she was needlessly barbaric, it was framed as 'Yaaaassss kweeeen' so we as an audience are manipulated in to overlooking it.
The times she was talked back from the edge by Tyrion or Ser Jorah or whoever it was framed as her overcoming her Targaryen-ness rather than us as an audience being asked to recognise that she's got that madness in her we were asked to give her credit for suppressing it because of how it was told to us.
Her getting to the point where she's leveling a city will always be somewhat jarring given that so many people bought in to the framing of her as the great white hope, breaking the wheel, liberator of slaves. Give us more episodes and better writing and there'd still be a great number of people who didnt think it felt like Dany, cos they bought in to the 'lie' the show told us.
You can say the framing was wrong, given where she ended up. And there's an argument to be had there, maybe it was and maybe the show should have been more overt in giving us as the audience more of a gaze at her innate madness/tendency to act out.
Or you can attempt to appreciate the subtlety with which it was hinted at, look back and question/reexamine your reading of her actions and her character and see some depth.
Largely it appears that people seem to be going for the first one, mostly because the subtlety of that earlier writing was lost and as the show sped towards its conclusion and her descent in to madness also had to be expedited. Which again is fair criticism.
Does the 'slap dash' way in which she's had to turn ruin it for me personally? No. Cos I still enjoyed the slow burn build up and I'm not *that* invested in this being a work of art rather than a tv show about daft stuff like dragons, zombies, magic and all the other weird shit we just decide to enjoy for what it is.
Whenever she's gone a little OTT with the vengeance, it's been against people who have either caused her harm or harmed innocents. The crucifying of the slave masters was in direct retaliation for the slave children the masters had crucified to taunt her. The witch betrayed Dany rescuing her by double-crossing her with the blood magic on Drogo. The slaver selling the Unsullied insulted her when he believed she couldn't understand him. Etc.
She is impulsive and can lash out - and she can 'group punish' the majority for crimes committed by a minority (the son of one of the crucified slave masters told her that his father was a good man who campaigned against slavery; she'd picked the 'victims' at random)
But like I say, it was always against people she viewed as committing wrongs.
What had the ordinary civilians of King's Landing done to deserve her mass-murder spree? Why & how the sudden sea-change from a figure who could be murderously ruthless in the name of noble vengeance, to someone slaughtering thousands of innocents in a rampage after the city had surrendered?
It's frustrating because the source material is there, and in the right hands could have been crafted to take us along with the transformation.
Since she was a babe, she'd been fed on tales of her Taragryan ancestors ruling Westeros and been told that the Baratheon king, followed by Joffrey and (after Tommen) Cersei were so reviled by the Westerosi that she'd be welcomed to Westeros like a goddess to retake her family's rightful crown. She'd won the heart of the most powerful Dothraki leader and in turn led a Dothraki hoard. She'd 'bought' the Unsullied, freed them, then watched them, choose to follow her. She'd been hailed by thousands of freed slaves with that 'mother' shit. She'd birthed the first dragons in years, and had their full loyalty and command.
We can forgive her for having a Messiah Complex.
Yet she wasn't welcomed in Westeros. Not even in 'the North' when she took her armies there to fight with them against the Night King. Then she sees the population of the Kings Landing area swarming into the city to escape her because they're scared. Not welcoming her as someone freeing them from oppression. The deaths of her closest, most trusted and long-serving associates, coupled with the betrayals of Varys and, in her mind, Jon and Tyrion, and the apparent plotting by Sansa, leave her paranoia and mental state at breaking point.
This all makes some sense in explaining her descent into the sacking of KL.
But we're not taken along with the narrative. This season (and last?) we've had some key plot memes in flashing lights with big signs saying 'important plot point', whilst other times we're left guessing and having to fill in major gaps ourselves because the writers have neglected to follow the gradual and careful story exposition that characterised the earlier seasons.