What is root cause of how Hamas fought the way they fought ? When you ask yourself that you'll see whatever premise you're trying to draw upon is wrong.
There are tons of courageous Muslims and warriors Shia and Sunni. Way too many to name all of them. The most courageous is our dear to us Prophet Mohammed Bin Abdallah AS.
Iran is more courageous than other nations when it comes to Israel. Iran adopts asymmetric warfare method which helps it absorbs this level of damage and still retain ability to retailate. It's Iranian physicists and engineers, military leadership that made it possible.
Iran's style of warfare makes it so it can engage in such warfare that's not as risky then traditional style of warfare. Some Sunni nations for example do not adopt asymmetric warfare and if they go to war with Israel it will be much more dangerous for Muslims because the Sunni nations near Israel will mount a ground offensive and not trade fire from a distance. Israel of today is a lot crazier than 1948, 1967, 1973 and will very quickly threaten to use nuclear weapons if any modern military crosses their borders.
The responsibility is much greater on these nations because the outcome could be very dangerous for collective Arab world, we are talking tens of millions killed if not more.
Iran hasn't been able to kill more than 20 Israelis in this war. We admire their effort but you need to understand shit can fan quickly if Sunnis enter into a war with Israel and thus they have to take into account in everything possible outcome, what kind of human catastrophe it can entail for Muslim population, because if Sunnis enter a war with Israel, they will go for the kill. It will not be limited in any way, shape or fashion.
This does not make Sunnis lesser than anyone else or scared, no. The Sunnis are the largest group of the Ummah and have much larger responsibility than smaller sects.
The Mahdi as far as I know is a leader and not needed as a warrior. And would be some kind of genius Muslim male with the name of the Prophet that isn't religious or fully practicing but God makes him on the straight path over night to provide leadership by a capable person for the Ummah.
We should focus on winning wars and doing damage and not just seeking martyrdom. Martyrdom is actually not liked and this is proven by verses in Quran but Allah says we may hate something but it's good for us in the afterlife. But we are commanded to win and if we win, not commit transgressions after winning.