It seems a bit suicidal, that's all. I'm surprised that even Napoleon was doing this, since he was a genius.
It's important to remember that even with men standing upright under fire, musketry was not as terribly deadly as people think. Depending on the army, it could take a hundred or even eight hundred shots fired to cause a single casualty. Armies did not typically win simple by scything down their opponent until nothing remains. Rather, engagements are won by morale and strength of will. Seeing your fellows show trepidation against fire does not inspire confidence in the soldier, and undermines the combat cohesion of the unit.
If the musketry and artillery can force a unit of men to go to ground to avoid fire, it's achieved its purpose. The attacker will be unable to advance quickly, as once men got down, it was very hard to get them back up. Dispersed, it would be easy for cavalry or infantry with fixed bayonets to overrun them, and thus win the engagement without carrying out much real execution by fire.
However, that's not to say men didn't seek protection from fire, through dispersing or taking cover. The French Revolutionary and Napoleonic Wars saw the increased proliferation of light infantry, who fought in open order, and it increasingly became expected that typical line infantry would be able to fight in open order. It became common for a French corps to fight in two lines; battalions in the front line would usually settle into a heavy skirmishing line, while the battalions in the rear remained in columns so they could rapidly traverse the battlefield.
Hi, I'm responding on mobile so I am a bit limited.
A comprehensive answer to your question would require a dissertation covering everything from conscription, the size of available armies, tactics and the equipment available. However the simple answer is perhaps that muskets were inaccurate beyond 60 paces and that to put effective fire down range required volley fire. Large numbers of muskets all firing at once in the same direction.
Add to this the fact that weapons used black powder for propellant which generates huge volumes of smoke. Within a few volleys the area between and surrounding the formations were completely obscured by thick smoke further reducing visibility. So everyone was firing with inaccurate weapons into a veil of smoke. Individual targets become impossible to identify let alone target.
So in a volley exchange the winner was the side that could put more shots down range faster that the other and have the morale and training to hold their line. The only way to exert any control on the firing was to use massed formations