You're getting your casual factors mixed up. ISIS started in Syria as one faction in a civil war that began entirely as a domestic uprising. ISIS expanded into Iraq as a follow on to Al Quaeda in Iraq, due to the Iraqi regime's harshly sectarian approach prescribed by their Iranian backers. 
Typically western view to think it's all about us, with no appreciation for the Sunni / Shia or Arab / Persian animosities consuming the region.