But if you spread out your soldiers in a skirmish line, they’ll be cut to pieces by enemy cavalry. A massed troop of cavalry can charge in and stomp your skirmishers with impunity. Best case is that they all get killed. Worse case is they try to run away. And then your other troops see their comrades running away, and figure they better run away too. And then you have a rout, which is when your soldiers really get massacred.
Also, how do you exercise command and control over your dispersed soldiers? You have to give orders in some way, there aren’t any radios. So bugles or drums or signal rockets or flags, but those signals don’t carry far over a noisy battlefield covered in smoke. You have to send runners–literal runners–to your officers, and they have to relay the orders to their sergeants and the sergeants have to scream the orders to the men in front of them. Men who are dispersed behind cover are very reluctant to leave that cover. So they’re safe, but they aren’t doing much good fighting the enemy.
The point is, a dispersed line can easily be broken by a concentrated force, because the concentrated force has local superiority. If you’ve got 1000 in a dispersed line, and a mass of 1000 guys attacks the line, most of your guys will be unable to shoot at the massed soldiers.
You’re used to the idea that if somebody sees a glimpse of an enemy soldier, they aim their weapon at them, fire, and the enemy soldier drops dead. But old fashioned firearms just didn’t work that way. They didn’t have anything close to the range or accuracy or rate of fire of modern firearms. If you have muskets, the enemy can literally line up outside of musket range, fix bayonets, and charge you. And you have time for one, maybe two, maaaaybe three aimed shots before they reach your lines. If you ever watch movies where the sergeants are screaming at the troops to hold their fire, that’s the reason. Fire too quickly and you’ll waste your shot at troops that are out of range. Fire a bit later and they’re in range, but you’ll probably miss anyway. Fire at point blank range, and you’re pretty sure to hit someone. But you can’t just start firing, because you have to stand up to reload a muzzle-loader, and it’s a complicated process.
So consider that for 400 years armies fought in very much the same way. If winning a battle was as simple as “disperse your troops and get behind cover” then why wasn’t this a standard war-winning tactic during this period. People back then weren’t stupider than people today, and they didn’t like being shot at or killed. Yes, generals are conservative, but when the old generals armies lose and they get massacred, new generals take the place of the old generals.