Why do they do it?
Well, warfare isn't based on single soldiers making personal choices whether to attack or trip and leave behind.
I'm absolutely sure that each and every one has a different totally different approach to this question, whether one has experienced a military training or not and got a real idea of what it is about, instead of basing these things on stuff seen in movies/games/airsoft. Trust me.
Also, that kind of a scenario is rather far-fetched when considering modern warfare. You're not told to charge from the trenches just to draw enemy fire... The casualties in modern wars are in hundreds, tops, not in the hundreds of thousands like in the World Wars.
I'm not sure how I'd even go and start to explain real-life warfare from scratch. So I'll just leave this at that.