Exercise of 19th century ... "Machismo"
I say so because of the following fact.
Most of the combat deaths and horrific injuries of the civil war can be attributed to frontal assaults on fortified positions. That is, these weren't "battles" in the true meaning of the term. They weren't fights among equal combatants. They were simply a means of slaughtering (or maiming) perhaps 90% of the men making the charge. Thus, if you were in the charge, you had a small chance of escaping unscathed which increased the measure of your "bravery" versus all other men (presuming that you survived the scuffle).
Thereafter, you could march down main street and no one could call you a coward whilst at the same time you could secretly look down your nose at "those others who didn't fight for the cause".
Why can I be assured of the truth of this interpretation?
Because they made no attempt whatsoever to protect themselves from being killed (much the same as the people on the Titanic made no attempt to save themselves from drowning ... which most surely would have succeeded).
Well, what could they have done?
Let's take Picket's charge for instance. What could they have done differently? Well, they could have gone at night. That would have given them equality with the Union army. Both would have been equally confused and disoriented. But they would have easily made it to ... and over ... the Union fortifications ... and ... perhaps have won the battle. One can pick apart anyone's tactics after the fact though.
So, let's terminate the point by inventing a mechanical contraption which would have saved about two hundred thousand lives ... maybe 1,000,000 by shortening the war.
Here, you remove the cannon and install an iron plate (with shoot holes) on the carriage. Extend the rear so that a dozen soldiers can hold on and push over reasonably level ground. Alternatively, one could use wood or logs in place of the iron plate. By using readily available materials this thing could be made very quickly. It would have afforded reasonable cover while moving to the front, i.e. it wouldn't have been a simple suicide. Put a half dozen or so side by side and you have a mobil fortification which can be advanced at a trot because it is comparatively light (per man pushing ... you only need about a quarter inch plate to stop a "ball" and some wheels to roll it with). And ... when the works are breached the entire regiment can flood in through the hole.
Apparently, the lessons of the civil war weren't learned till the 2nd World War since the soldiers in WWWI were required to charge the trenches under suicidal machine gun fire.