Your need to maximize firepower.
If the enemy mass his men and just charge forward with the bayonet, you need sufficient firepower to stop him. In 1860 that required you to use a close ordered line.
A danish book from 1942 about the 1864 war against Prussian, Try to compare the situation during the 1864 war with the situation on the west front in 1918.
It mention that a danish defensive position in 1864 had 16x (200man) companies in the front line. A similar position would in 1918 have been held by only two companies. The improvements in firepower made it possible to use less troops to cover the same length of ground.
----
And with the rather poorly trained civilians turned soldiers and officers it was not possible to open up the formations. (not until late in the war, when different units did start to do it by them self)
This issue was recognized by the union. The drill book require the two flank companies to be used as skirmishers as the standard way of doing things... this "rule" was removed.
And moving large numbers of men in an open formation is a lot harder then doing it with them in close order... so you are basically forced to use a close formation.
Also the line is a lot less vulnerable than a column. (but also a good deal slower and harder to control)