Which is both why it's slightly more plausible to "defeat ISIS" using a standard military, but it still wouldn't solve the underlying problems. More likely some other group just takes up the ISIS flag again a few years later.
Prior to the post-9/11 period, during which, after a brief spike, the value of al-Qaeda's brand fell, the Taliban in Afghanistan wasn't so much a government sponsor of terror as a government sponsored by al-Qaeda, and a key part of al-Qaeda's appeal and legitimacy. Success at establishing territory with a formal government of the style promoted by the ideology has been as much a part of al-Qaeda's appeal as it is for the Islamic State (and the failure of al-Qaeda central to maintain that is a big part of the reason that al-Qaeda in Iraq, with its greater success at that, broke away and became, through a number of steps, "The Islamic State".)
The group that later decided to call itself "The Islamic State in Iraq" used to be "Al-Qaeda in Iraq", and both it and its parent organization had the goal of establishing a caliphate then; this has always been an al-Qaeda goal.