Specifically in regards to ISIS its also about "changing the world" and being a force for "good" in the world. This sort of idea is appealing to those that are young as well as those who feel the need to be "redeemed" or are stuck in some sort of rut. To just attribute it to religion is missing a lot of the background detail of why people do these things.
There is differences between some follows of religion and others. As a Theology Student who has read the Koran several times, I can tell you it is not based on the Koran, but more about ideology and worldview and not what their religion teaches them. This is why when most Muslims confront terrorist they tell them they aren't Muslims.
For example Westboro Church's stances and action are not built off of what Christianity traditions, scriptures or historical figures taught them but it based on their own twisted worldview and ideology that causes them to protest veteran's funeral and attempted to protest Sandyhook victim's funerals (Happy to say that my home state wouldn't let them get there)
So slamming all of "Religion" is being disagreeable. I think the biggest thing all of us, especially in US right now, needs to judge ourselves on how we treat people we disagree with.
What matters is the most accessible, loudest voice in the space. Just like fake news, accessibility and network effects are the only things that matter. The demand is for one particular religion to acknowledge and tame the spread of this loud, violent "fake" religion/interpretation, if you will
There are millions that do and thousands of great academic scholars who strive for that. I went to seminary and studied for over 5 years Greek and Hebrew so I could know better, but the issue is MOST don't care. They care more about what so and so says.
Another clear narration can be found here: https://sunnah.com/urn/245570
I guarantee you that none of the leaders of outlaw groups like ISIS would be able to hold a proper debate to defend their points of view in front of a well-learned scholar, they would get instantly demolished. The issue is that you have a lot of uneducated and/or emotional people who fall for their propaganda and end up joining them unfortunately.
If there was truly one well-learned scholar who demolished everyone else, religions wouldn't have these problems.
But all religious texts remain big books of multiple choice where any section can be declared literal or metaphoric or mean something totally different because "context", all on a whim of the "scholar".
I just gave an example about a well-learned scholar refuting ISIS's leadership in a way to show how well established Islam's position is about this topic, that any single person who is well versed in the matter can tear down their ideology. And yes, there is historic precedence with something similar happening with the Kharijites.
This might be of interest: http://www.lettertobaghdadi.com/
The Quran does acknowledge the fact that different parts of it may be allegorical: https://en.wikipedia.org/wiki/Muhkam_and_Mutashabih_(tafsir)
At the same time, there are many parts which are clear, and which all well-learned scholars have agreed upon since the very beginning, which are not up for interpretation (e.g. what ISIS is doing today). Any well-learned scholar can tell you about the Kharijites and how they went astray, citing the Quran and the Hadith, as well as narrations from Companions about how they dealt with them. It is established Islamically that the behavior of the Companions as a whole is something we are ordered to follow, and those same companions dealt with an ISIS-like group that emerged during their time. This is not up for debate.
Other things which are not as grave as bloodshed and which have not been firmly established throughout the history of the Muslims can be up for debate, no problem. It happens all the time. And such topics do not touch the "core" of the religion, only "branches" if that makes any sense.