Those who die for the cause of Islam are supposedly given the highest ranks in heaven, and get more "heavenly benefits" than others. In Islam, there is not just hell and heaven: heaven and hell are separated into ranks depending on how good/bad you were in life. The highest ranks are given to prophets (e.g. Muhammed) and martyrs. The Quran is littered with references and warnings reminding you to work hard and make sure you get into the best rank, since there is no going back once you die.
Therefore, this sort of teaching brings forth the mentality that since heaven is eternal and you can never go back and change it, you have to use every opportunity to score as many points as you can. (This, incidentally, leads to a very high rate of anxiety and obsessive patterns in muslims, and OCD is unfortunately very common amongst muslims.)
Also, it means that if you have an opportunity to become a "martyr" you should logically take it.
Now, this is where things get particularly ugly because there are always people who are either corrupt or extremist, and they use "martyrdom" as an tool to convince muslims to do things that most sensible people would refuse to do.
For example, in the Iran-Iraq war, young boys as young as 14 years old were recruited by the thousand in the Iranian army. They were told that this is a holy war, and therefore dying in this war gives you eternal heaven. So teenagers dropped out of high school to volunteer for the army. They were often guided over minefields --- they were asked to clear minefields by simply walking over the mines and killing themselves. 40,000 young people died this way in 1 night just to clear a path to 1 city.
The same ideas work for suicide bombers. In fact, in the native language they are not called suicide bombers, they are called "martydom-seekers".
So, in summary, Islam inflicts upon its followers a number of mindsets which make them easy to manipulate into doing stupid things.
Unfortunately, Islam also comes with a number of safeguards to prevent common sense from taking over. For example, muslims are taught from a very young age that they are not allowed to question islam or even think about the idea that the teachings of slam are not God's word. I was told that you're not allowed to even listen to somebody questioning Islam. So it kind of traps you within a number of mindsets that disallow most people from seeing beyond. It takes a lot of willpower and courage to go against all of that and start to think freely -- it took me years to finally break free from it.