I think our biggest mistake was forcing a type government upon the Iraqi that they didn't want and basically had no knowledge of. That also includes how to use it. Then you had the deep divisions with Iraq itself, tribal, religious, ethnic, which could be boiled down to three, sunni, shia, kurds. None wanted to live under the other even if they had a vote. They all want leaders of their kind, from their own tribe, sect, etc.
Americans do not realize when we sent to democracy we had a working knowledge of it from the magna carta on forward. We were basically all English in the thirteen colonies, use to the British Parliament and that form of government. We really didn't have different sects or that much different ethnic backgrounds then. Our colonial leaders had knowledge of both the English system and of Greek Democracy of the ancients. We had spent a couple of centuries priming ourselves for our form of government.
No so with Iraq and Afghanistan. It was basically here, we won the war and now you are a democracy. Break yourselves down into political parties and vote. Like some colonial master of old, we won a war and then told them, like subjects this is your new form of government. No input from them, we gave them no choice. Now even the shia clerics are threatening the SF we are about to send in to help them. Stay out say the clerics, perhaps after all our mistakes involving nation building, perhaps this time we should heed their warning.