ISIS was formed due to the power vacuum left after the USA withdrew from Iraq, largely by the former officer corps of Saddam's Iraqi Army, who had been left disenfranchised after the policy of de-Ba'athification [1] of the Iraqi government, replacing a vaguely competent government with a completely incompetent government.
ISIS was a problem of the USA's own creation, just like the Taliban, Al-Qaeda, and the current Iranian regime.