You seem to be completely ignoring the lack of legitimacy and popular support that the authoritarian regimes in both Iraq and Afghanistan had, as well as the human rights violations that were commonplace while they were in power.
The war in Afghanistan was obviously a complete and total failure given that the Taliban are now back in charge, but it's hard to argue that after all this time that the Iraqis aren't better off living in an (albeit flawed) democracy than under the rule of Saddam Hussain.