This woman has shown such a capacity for and predelection towards violence and cruelty throughout the whole series. This is a woman who crucified so many people in Meereen that they lined the road to the city for miles. She left them up on their crosses to say "if you stand against the Mother of Dragons this is what happens to you." She was using fear to advance her ends. She has used violence and cruelty to advance her ends through the whole show. And I get you will say "well they aren't innocent! they were bad people! they were slave owners!". It doesn't matter, cruelty is cruelty and once you are willing to be cruel then you are cruel. The fact is the slave masters stood in Dany's way, thats why they were killed and had their bodies displayed.
She burned prisoners of war alive for not bending the knee to her. This also displays a hypocrisy she has. She wants to free slaves but she wants to be an absolute Monarch. In Westeros everyone is essentially a slave of the Queen. The Tarly's refused her command and she burned them alive for it. How is this different than a slave owner.
You also have to realize that Dany believes her own crap. She believes the Throne is hers. It's her birthright. She believes she HAS to be Queen at any cost that no price is too high because once she is Queen she will be such an amazing Queen it will all be worth it. Once you believe something like this there is nothing you won't do to get your crown. She is like Stannis in this regard.
Combine this with her huge capacity for vengeance and violence and what she did this past weekend is 100% in character.
Some quotes from Dany:
"When my dragons are grown we will lay waste to armies and BURN CITIES TO THE GROUND" --Did you think maybe she was just joking around?
"I will take what is mine with Fire and Blood"--maybe she meant she was going to light fires for the smallfolk to cook food and donate blood to blood drives?
"You counseled me against rashness in Qarth. I didn't listen. It worked out well"
"They can live in their old world or die in my new world"
"Will you kill my enemies in their iron suits and tear down their stone houses?"
"Enough with the clever plans. I have three large dragons. I'm going to fly them to the Red Keep"
"I'm here to save the world from tyrants and I will serve it, no matter the cost"
"Perhaps it's good the people see Daenary's Stormborn made every effort to avoid bloodshed. They should known whose fault it is when the sky falls down on them"
"Let it be fear"
These are quotes from her. Starting in season 2 and then throughout the show. In fact the 2 most alarming quotes are both from season 2, the first 2 I posted. She flat out said her dragons would burn cities to the ground. This is who the character is. This wasn't some shock or turn to evil. This is who she is and based on the circumstances that have engulfed her recently is exactly how you'd expect her to act. Throughout the show her first instinct is nearly always violence "Fire and Blood" and she constantly is being talked out of it by advisers. If you didn't think she was capable of something like this, I don't know if you are not paying attention or just ignoring what has been said and done by her throughout the show.