Despite all of the logical reasons not to destroy King's Landing, Dany did promise to "break the wheel" and stake her claim to the throne. By destroying King's Landing she not only exacted her revenge, she ensured that the rulers of Westeros would have to contend with her claim, regardless of any of the politics that came before her. She saw what happened with Mereen. By usurping Cersei, who had already sown distrust amongst the people, she was only going to inherit a throne surrounded by distrust and disloyalty. She basically wiped the slate clean and wrote her own sins.