The reason more people didn’t die is that much attention was focused on not dying. As much as WW I Generals get lambasted for thoughtlessly sending men to the slaughter (which did happen in isolated situations), the reality is that most of them were feverishly working on ways to keep their men alive while killing the enemy.
Trenches are a great example. Trenches are often used as a symbol of the horror of fighting in WW I. And while living in one wouldn’t be great (although the German trenches could be quite cozy), you were remarkably safe in one for the most part. Some of the highest percentage casualty figures in WW I happened right in the beginning when most had no understanding of what fighting in the open would be like.
All sides quickly learned and dug in (particularly on the Western Front). In some situations (particularly with the Germans) the trenches were dug with concrete enforced bunkers deep underground. Practically impervious to artillery. And the strategy developed to have multiple parallel trenches that were connected. So often the majority of men were either in deep bunkers or in a trench further back during that horrible WWI artillery bombardments, then they’d rush up to man their positions when the infantry attacked. In sum, trenches were great at keeping people alive.
Tactics also rapidly developed during WWI, fully embracing open order infantry tactics as the fighting went on, rather than more closed order formations that were seen at the very start of the war. Spread-out, hug the ground, etc… During assaults, great care was typically made to limit casualties as much as possible. This includes incredibly intricate artillery barrages, creeping barrages, feints, smoke screens, chemical weapons, etc… to try and give the attacking forces cover. They didn’t always work, but they often did.
Additionally, the vast majority of casualties in WWI was caused by artillery, not infantry rifles or MG’s. The overwhelming majority of bullets fired in a war (any war) miss. Most are shot w/out aiming or maybe even seeing the enemy. MG’s are as much about suppression as they are mowing down a group of men (although of course, they can do that too).
We’d also add that humans by and large really do not want to die, and they act accordingly. Most soldiers in an army are brave, but they’re not looking to win an MoH. They want to do their job, support their buddies, and get home. Most officers understand this and try to avoid breaking their men (or getting shot in the back).
If an MG opens up, most men will go to the ground, not charge it heroically (see the prior point about MG and suppression). Conventional wisdom in “modern” warfare is that when a unit hits 30% casualties, it is combat ineffective and should be rotated out. Of course, there are many examples of units exceeding this and continuing to fight, but it’s usually out of desperation. When they can, most officers would rotate a unit out if they took that many casualties. Again, soldiers are normally brave and do their duty, but they aren’t Rambo’s.
That leads to our last thought about WWI. While living in trenches and going over the top were not great situations to be in, those moments for most soldiers were incredibly rare. On the Western Front, units were regularly rotated back to the rear for R&R or less onerous duties before spending relatively short periods in the front line trenches. Senior leadership generally understood their men had breaking points, and they did their best to not push it.
None of this is to say that fighting in WWI wasn’t so bad. If I had to fight in any war in history, WWI would be near the bottom.