One of my favourite WWI myths - repeated numerous times in this very thread - is the "walk towards the enemy in a line" myth. It's a popular myth, because it reinforces that other great WWI myth - that WWI was a war commanded by brainless upper class idiots who cheerfully marched lower class soldiers to their deaths with no regard for their welfare.
These are two of the most popular, most enduring, and most wrong myths about the entire war. I only want to comment on the first for now though. Such observations about the lunacy of "walking towards the enemy" are made from a place of total ignorance, with zero understanding of the tactical situation, the reasons for the measures taken, or the relative success.
The critical factor missing here is the creeping barrage. Prior to the implementation of the creeping barrage, the standard allied attack tactic was to run towards the enemy, in clumps, moving from shell hole to shell hole, exploiting cover. Prior to assault, the artillery would shell the intervening ground in a deliberate attempt to create shelter.
Using these tactics, allied forces were annihilated. German defensive positions remained intact, and the German gunners were able to fire indscriminately on the hapless soldiers, who took an age to cross the intervening ground.
The creeping barrage changed all that. Concentrated, accurate artillery fire, en masse, was used to create a "screen" in front of the infantry. Not only would these barrages cut barbed wire and other obstacles, but they dramatically reduced the amount of enemy fire that could reach the infantry as the intensity of the barrage was so high that enemy fire simply couldn't get through it.
As the infantry advanced the barrage would "lift", moving ahead of the infantry. As the infantry were nearing the enemy trenches, the enemy would be receiving this murderous barrage, and would be unable to perform defensively. Then, the barrage would lift to behind the enemy front line, in order to prevent counter attacks or secondary trench lines from firing on the allies. This would leave the allied soldiers with a short sprint to reach the enemy trenches, and they could be in them before the Germans had time to return to their guns.
The catch is, an effective creeping barrage relies on precise timing. If the barrage gets too far ahead of the infantry, the German defences can get inside it, and cut down the soldiers. If the barrage gets too far behind, your own men will be hit by it.
The question then, is how do you coordinate a creeping barrage in a time that lacks the kind of sophisticated communication equipment that would allow for accurate real time adjustments? You have to have the entire thing perfectly timed out from the outset. To the second. And to make that work, the infantry have to maintain a slow, careful pace. So they walked.
And the thing is, when the plan worked, casualties were remarkably low. After the creeping barrage was introduced, and the allies started "walking at the enemy" casualty rates dropped, and where we got spikes in the casualty rate, like at Passchendaele, it was because the creeping barrage wasn't implemented effectively.