Mostly all Civil War movies/reenactments you come across a scene that goes as follows... Union/Confederacy are advancing in an open field towards the enemy but are walking as cannonballs and what not are flying passed. Why are they walking? If it was me I'd be trying to sprint across that open field as quickly as possible. The only reason I can think of, is that they are trying to conserve energy for when they do come in range of the enemy. Is conserving a little energy worth the casualties associated with walking? Is there any truth to that or any other reasons why walking across a battlefield as cannonballs are coming at you is a good idea.
In the Civil War era and earlier, the units needed to keep together in order to avoid being ridden down by cavalry. An experienced infantryman could shoot three times a minute, and a line of them could punish a cavalry unit easily. If you scatter, then you have fewer effective shots while an enemy approaches and they get among your men and cut them down.
This was even more of a factor in the pre-Civil War era, when musket ranges were very short. Then you needed the mass to form square to repel horsemen.
You have a similar issue when facing another enemy infantry unit. If you lose formation, the other side has more firepower and more mass at the area of contact and you will likely lose the engagement.
The final reason to keep a unit form is tactical management. The officers can't control a unit that scatters over a wide area and can't see what to do. A unit not under control just has to sit there and take it, and thus could well lose more men than one that moved more slowly, but under control.
By definition, re-enactments are a reflection of the way battles were actually fought. Civil War re-enactments are a reflection of the way Americans fought in the mid-nineteenth century. (Just about everyone in that war was American, with the exception of the odd foreigner.)
Americans were much better shots than most (European) foreigners. American (and British) soldiers and officers therefore had a much greater respect for "firepower." The way to maximize the value of firepower was to have soldiers "walk" across a battlefield at a measured pace, even if some of them, inevitably, get killed. This was in contrast to the melee and charging tactics that some European armies used. And by the Civil War times, guns could be reloaded fast enough so that these "walking" tactics were often effective even against cavalry.
The difference between and re-enactment and the "real thing" is that re-enacters don't fire, while their counterparts did. But re-enacters would walk/march across the battlefield at the same pace as real soldiers.