So, from what I remember from history, this was widely used by British forces right up until the invention of the machine gun by the Germans. Once you could deliver a large number of projectiles down range very quickly from a single position, this was an insanely stupid strategy. Before that, most rifles were very slow to load and fire, and had the accuracy of a storm trooper.
By lining up like this you would create a dense “cloud” (if you will) of projectiles every time the commander would yell “FIRE!” Making it far more likely for something to land on an intended target (whether that was the target being aimed at or not). Additionally, it wouldn’t just be one row of soldiers, more like 5+ rows of soldiers in this formation. When someone inevitably gets shot, the next soldier in line would step forward, over their dying friend to take their place. The result was a wall of firepower that worked very effectively in field combat.
More soldiers = more guns = more projectiles going down range for the enemy. If you wanted to be effective in the field, having more bodies to throw into the battle was a way to ensure success.
Once the machine gun was invented, one small troop of 3-4 soldiers could effectively counter this maneuver by simply holding down the trigger and panning across the field of battle half a dozen times. Which is when trenches and fox holes were the preferred way to ensure you didn’t lose your entire military trying to fight the enemy. With the improved accuracy of weapons and the invention of automatic fire, these battle tactics only spelled failure for anyone attempting them. Suddenly having cover either in the form of a trench or sandbags or something, was the only effective way to ensure you didn’t get “mowed down”.
In the modern era, field combat is a complex operation of coordinating troop movements and directing them towards the enemy while maintaining cover to protect the lives of the soldiers. Somewhere between radio and high accuracy assault rifles is where modern combat exists. Keeping in communication with your team while coordinating your movements, and accurately firing at the enemy as you go is now the norm. In times between WW2 and the modern (electronic) era, you would use code names and reference places with specific, agreed upon alternative namings for locations. Once cryptography became efficient enough to be portable, encryption has become favorable to increase the security of communications and clarify names and locations by using more plain language while protecting that information from eavesdropping. Before encryption and digital transmissions, everything was either AM or FM voice (not dissimilar to AM/FM radio), and could be intercepted or listened to by any person, friend or foe, with the equipment to do so; the only option was to use namings that would obfuscate the intention, locations, attacker, and size of force from anyone who may be listening in.
The cypher/cryptography of the age was fascinating, and “both sides” employed code breakers to try to understand the messages being sent. It’s very fascinating. As an amateur radio operator, I get what they were doing, and it employed some very clever tactics, which had varying degrees of success. Now it’s just a matter of using a digital encryption cypher to encode any communications (not dissimilar to what is used for secured websites) which is nearly impossible to break without significant time and effort, and usually by the time the cypher is broken the operation is complete and the codes have been changed. Being an IT person by day, and knowing how those cyphers are generated and used, it would be nearly impossible to “crack” in a reasonable time frame, even with even powerful supercomputer hardware. The modern digital and military communications systems are only really countered by employing jamming technology to scramble legitimate signals with noise. The only counter to such jamming is moving to a channel which is not jammed, which may be impossible with limitations to the equipment that is employed in field operations (they generally have a fairly small operational frequency band, which they cannot exceed), however, with software defined radios and multi band radio transceivers, this limitation is getting easier to overcome. However setting up multiple jammers to cover the useful radio bands for long distance communications, is becoming easier at the same time (generally bands below 500Mhz or so). The arms race to find ways to overcome these problems is far from done though.