Up front disclaimer: simply due to keeping the title a decent length I couldn’t specify that I’m fully aware that in most battles, the large majority or soldiers would be unhurt, and that usually a battle is won after a relatively small portion of the force is killed or wounded. I’m not suggesting that standing in a line is an instant death sentence, only that it seems like your fate is entirely in the hands of pure luck.
All that said, I’m wondering this because I recently heard in a video saying that linear warfare would arguably be the worst era to be a soldier in, because unlike previous periods, skill made no impact on your survival.
They explained that in earlier periods, while sure bad luck might have you get hit in the face by an unseen arrow, that at least skill with your weapon might increase your odds in a melee.
Likewise, in later periods knowing when to use cover, when to return fire, when to bound etc. might not save you from an unlucky mortar, but it might help keep you from getting shot, or help keep that mortar team from pinpointing your location.
But if I’m just some random line infantryman standing in my spot on the firing line, shoulder to shoulder with the guy next to me and no where to move to, it seems like there’s nothing I could do to up my chances than to run away, or somehow personally outshoot the enemy company across from me by such a margin that they can’t shoot back, but that seems impossible.
In many ways, standing in line would be a great way to survive. Looking at the previous century, Charles Carlton's Going to the Wars: The Experience of the British Civil Wars, 1638-1651 makes that case that a unit which broke and ran in a "panic-flight" was more likely to be slaughtered during their uncontrolled rout than the unit which stayed put and fought. The longer they remained in formation, the more likely the other side would break. Certainly standing in line exposes individual soldiers to musketry, but running as individuals makes everybody pretty much helpless against pursuing cavalry.
Looking at the eighteenth century, when pikes had disappeared from European battles and the armies used flintlocks, again, remaining in formation is helpful long-term. Using a smooth-bore musket makes individual, precise aim nearly impossible. So controlled firing in a solid line is the most effective way of decimating an enemy. A unit that can keep calm under fire and produce solid volleys could create a killing zone in front of them. The limitations of the musket technology meant operating as an individual was difficult.
What about rifles? They have spiral grooves cut into the barrel that puts spin on a ball, helping it to fly farther with greater accuracy and force. So a rifleman could operate as an individual at times, but rifles took so long to reload that they were limited in value in heavy fire situations. According to Robert Middlekauff's The Glorious Cause, during the American Revolution, American forces could operate effectively with rifles in the right situations, but often they collapsed when faced with a bayonet charge. British soldiers had the discipline to remain in line, fire a devastating volley, and then charge together in line. So again, remaining in line gave you a tactical advantage.
Morale was also a huge element. Most common soldiers weren't volunteers, and didn't want to be there. They needed to be supported by their companions. John Keegan's Face of Battle actually recounts how, in the very opening battles of the First World War, before trench warfare, some British officers had to keep ordering soldiers to spread out and not bunch together, as everybody wanted to feel the press of their mate's shoulder. Thinking about the earlier centuries, remaining in line helped maintain discipline and morale. It meant units could maneuver on a battlefield.
Ultimately, running away made soldiers individually vulnerable. Remaining in line gave them a chance of winning the battle, which was the best way to stay alive.