"Subverting expectations" is the way directors and producers explain away illogical shifts that break characterisations for the pure shock. Unexpected events that are within character are great drama, simply having someone slaughter civilians to "shock" the audience without motivation is melodrama. Had Daenerys gone full Bomber Harris Dresden mode after the beheading of Missandei it would have been a natural plot beat for a character to break emotionally. But when the bells were ringing? Then have Grey Worm and the Unsullied turn on civilians as the armies were surrendering and the battle won? Cheap and unearned.
The irony is this has been flagged since season two in with the changes to her vision in the House of the Undying on the TV show that showed the burnt out throne room and her not getting the seat, they have tried to show it in her character in places like the burning of the Tarleys. The reveal to Samwell gave emotional weight to the impact of her actions.
Thing is this might be from the GRRM outline for the book plot, it may be foreshadowed by the Battle of the Bells where Jon Connington did not burn the town Robert Baratheon was hiding in that helped him escape and get the rebellion underway. Many suggested Tywin would have just burned the town. (The town were ringing the bells to alert Baratheon), but its pretty unlikely it will be written this way. But hey, that the book wanker in me.