Several key factors that can push them to extremes and can help explain their perspective:
Death Of Muslims: Muslims have been witnessing the continual slaughter of their brothers and sisters by opposing forces in their lands. Instead of such incidents abating with time, every few days a new headline in some newspaper conveys the death of more anonymous Muslim civilians. This can encourage Muslims to sometimes make quick and irrational decisions, often times leading to innocent civilians being killed on the other side. "We can't just sit and watch them get butchered while we sit comfortably behind our screens. We have to do something"! (Confessed terrorist plotter who used this reasoning.)
Attacks From The West: Some Muslims may see the Western world as their primary enemy because of their attacks, invasions, support of oppressive regimes and their killing of thousands of civilians in Muslim lands in the last century. From the invasion of Iraq to the military endeavors in Afghanistan, from Abu Ghraib to Guantanamo, from Aafia Siddiqui to Ali al-Timimi, from the 'War on Terror' to the 'Patriot Act', it can become easier to convince an impressionable mind into accepting the West versus Islam paradigm (as if these two entities can be surgically and neatly delineated, separated and defined). It's not hard for some Muslims to feel strong resentment towards the West and this resentment can push some to go to the extreme in retaliation, consequently justifying taking the lives of civilians on the opposing side. "They killed our people, so we should be able to kill theirs" is a common argument they use. (Jihadi John mentions similar rhetoric before executing an aid worker).
With Us Or Against Us: Among extremist groups, you will see Muslims who have adopted a very simplistic, black/white view of the world. Either you are on their side (side of Muslims) or on the side of the disbelievers (kuffar). When they come across Muslims who have condemned their group/actions, they will be quick to dismiss their arguments, saying that they are "aiding the kuffar". They see their condemnation as them betraying their own Muslim brothers and sisters who are suffering in other countries.
Economic Frustration: Extreme frustration with the economic situation of many of those involved in such groups, coupled with a lack of hope in alleviating their dismal situation. Years of poverty, oppression, unemployment and greedy political leaders in the Muslim world can push many of the youth to take the matter into their own hands. For those with no hope, fanaticism and over-zealousness gives them some hope. When there is no alternative, extremism becomes normal.
Lack Of Islamic Knowledge: A very common trait among extremist fighters is that they are largely composed of young, overzealous recruits that are relatively new to Islam or have a very superficial understanding of the faith. (Some examples: 1 2 3 4 ) A quick read through of the Quran and exposure to the first Muslim group you encounter can easily lead you to think that this group is on the right Islamic path. The more Islamic knowledge you have, the easier it is to recognize heretical groups & movements and to avoid making ill-advised choices.
Unwelcomed in the West With each new terrorist attack, Muslims living in the West prepare themselves for more backlash from their community. Right after the Charlie Hebdo incident, 50 anti-Muslim incidentswere reported in France in just 1 week. And many Muslims expressed the difficulty they've experienced with their neighbors after 9/11 in this AskReddit topic. Young Muslims may feel like that they can never belong in the West and may even question whether they should be supporting the other side.
Distrust: You can find those who support these groups online talking about how we shouldn't trust mainstream media on the topic of Muslim terrorists, because of the previous lies these sources have told us. There are those who honestly believe that the extremist group they support are in the right; that they are only attacking to prevent further harm. They will disregard any source that counters these claims despite how strong the evidence is against their group.
Lack Of Unity: Religious leadership among Muslims is disunited today; every loud voice can potentially become a leader merely by shouting loud enough. Anyone can potentially take on the lead without understanding Islam and the contemporary world or start takfiri preaching further dividing the Muslims into more smaller segments. Since there is no official Caliphate, you can find some smaller segments coming up with their own pseudo-Islamic state or their own pseudo-caliph. Lack of unity makes it hard for Muslims to voice their condemnation against any particular extremist group because they can't have an 'official opinion' on a matter.
Misunderstanding Jihad: The concept of jihad is a legitimate concept if applied properly in Islam; and it can be a type of terrorism if misunderstood and misapplied. It is like a loaded weapon: it can be used for good and to defend, and it can also be misused for harming others. Many other faiths don't have such a concept. Because Islam does, it can and will be misapplied.
Silence on Jihad: Muslim teachers in the West are restricted from speaking about physical jihad or have classes where Muslims can learn the proper context of battles in Islamic history, the conditions for fighting, etc. Because of this silence, young Muslims can be duped by extremist recruiters into accepting the alternative view and the permissibility of fighting with modern militant groups. Someone can easily show them narrations (hadith) of the rewards of jihad while being completely unaware of the major contextual differences in our time and can convince them of the greater good in fighting. When the only voices that address issues of concern are the voices of radical militant jihadis they find on the internet, it is only natural that young and impressionable minds will gravitate to these voices.
The Media: Terrorist groups are empowered by the media. The more attention they get, the more powerful their threats become and the more new recruits they can potentially secure. Violent groups, no matter how small in number, will always get more attention than peaceful groups. Hundreds of Muslim scholars can condemn terrorism, 10,000 Muslims can protest for peace, but the 1 Muslim who blows himself up or beheads a civilian, will be the person who receives more attention in this age, and more attention gives him a better chance for more people to join his cause.
The Easy Path: It might be surprising to non-Muslims, but in many ways, it can actually be more simple and easier for a dedicated Muslim to join one of these groups and fight. It can be much tougher for a passionate Muslim to envision living in a secular land with trials, tribulations and possible persecution for the next 30+ years, all while watching their Muslim brothers and sisters die. And the misguided idea of blowing yourself up and going straight to paradise sounds very easy. Many passionate Muslims are eager to die for the sake of God, but how many are willing to live for the sake of God?
Scholars Are Ignored: Muslims already supporting extremist groups will ignore Muslim Scholars who critique their groups. Calling them " sellouts" or saying that they are "aiding the kuffar" because they're condemning a Muslim group. "You can't criticize those Muslims fighting! At least those Muslims are doing something while you are just living comfortably in your home". Often i come across isis sympathizers online who completely dismiss Muslims when they are refuted by them. Extremists are emotional and impatient, and won't bother to take the time to read/listen to the entire message of Muslim scholars who often critique both sides and can explain to extremists about their flawed understanding. (Hostage claims captors cared little about religion).
tl;dr: The Muslim world today is in a entirely different economic and political context than the Western world. The Muslim world lacks unity, suffers from poverty, oppression, unemployment, greedy political leaders, and have been subjected to witnessing the continual slaughter of other Muslims by opposing forces in their lands for decades. These factors, along with others, can push some to join extremist groups.