The only way they can harm us is if we have vulnerable people in their territory, we've seen first hand examples of that. I don't see it as a big deal.
And you're right. We should have stayed out of Iraq in the first place. AQI was our problem, and we helped fix it, but ISIL is Iraq's problem. By the end of the insurgency, AQI was pretty much destroyed, and wouldn't have recovered if the new Iraqi government hadn't been so stuffty. They're the ones that ended up alienating their Sunni citizens and now they're paying the price. I bet a lot of the Anbar Awakening fighters who nearly destroyed Al Qaeda in Iraq have joined up with them now because of how bad the Iraqi government was/is.