It was actually a long term development. She started out as a timid girl afraid of doing anything because of her brother. She became empowered during her marriage and defeated her brother. Then she killed the Maji and gained even more confidence, she grew strong for her new children, aka dragons. At qarth she was told that she would face 3 betrayals. We already know about the one with three maji, and obviously jorrah is the second, the third has yet to be written. Knowing this has also made her stronger. With the torching of the city you have to understand that she feels a need to stand up for those who cannot stand up for themselves. In her mind she wasn't so much conquering the city and killing everyone as she was freeing the slaves.
Sent from my PantechP9070 using Tapatalk 2