It has everything to do with it. Imperialism destabilized the region, led to the removal of the stable and sovereign Iraqi government and the fomenting of the Syrian civil war (to the point of funding elements that became ISIS) with the aim of removing that government as well. The results of all of this created the conditions for extremism in general and ISIS in particular to arise and build.