The reason we have ISIS is that we were in such a rush to leave IRAQ we didn't bother to finish stabilizing the situation.
Seeing as Vietnam has been mentioned, I'll point out the exact same thing happened there. The war was brought to an acceptable conclusion and we pulled out before stability had been achieved. The cost that time was 4million dead Vietnamese and Cambodians. What do you think it will be this time around ?