As you mention the common late 1850s pattern United States .58 caliber rifle cartridge box was described as follows in the 1861 ordnance instructions:
The wrapped bundles of 10 cartridges were described in the period:
In the field the troops normally carried in the cartridge box, as you mention, forty rounds, with twenty in each tin; ten loose in the top of each tin, for twenty ready cartridges. The lower compartment of each tin holding another package of ten rounds.
The fully loaded cartridge box weighed in at several pounds (the box alone weighing about 1.67 lbs. according to the manual).
The heavy cartridge box was not infrequently shifted about the person on the march, to reduce the discomfort. From the History of the 115th Illinois:
As you mention, getting at the lower compartments in battle requires the soldier, once the upper trays are empty, to pull the tins to get at the packets underneath. This did not require the soldier to step out of ranks or anything, if they were in ranks while firing.
If the boxes were not carried on the shoulder belt, they were to be passed to the front for handling: Hardee's tactics made it clear that when firing the soldiers were to bring their cartridge boxes round to the front of their bodies for easier handling...
Casey's US tactics of 1862 made it more clear that was particularly where the shoulder belt was not employed:
But it would appear in action the soldiers frequently did as they pleased on that score evidently.
Forty rounds was the soldier's basic load, and twenty ready rounds was standard crammed in the upper trays of the two tins. As you mention, if the soldier had to, he could pull his tins and get to the two packages (of 10 rounds each) to keep firing.
Fully laden on the march the troops often carried another twenty rounds in their knapsacks...
And in action, sometimes in their pockets. From the 44th Indiana at Shiloh:
And afterwards, regarding the campaign against Corinth, Miss.
A federal soldier at Savage's Station in June, 1862:
During the Chickamauga campaign, the 15th Kentucky, US, carried their extra 20 rounds in their pockets, besides their "full" cartridge boxes:
Hirst of the 14th CT wrote of his kit in 1863:
I reckon before pulling tins all the ready rounds in their pockets would have been shot off first. And indeed, a soldier of the 18th CT at Harper's Ferry in June, '63 mentions just that:
Alexander Hunter of Virginia noted regarding Second Manassas:
John Worsham of the 21st Virginia mentions shifting cartridge boxes to the front in preparing to open fire..
The interesting point he makes is that firing sixty rounds in a day was an "enormous" expenditure. Evidently beyond the average...
Using the ammo. of the dead and wounded was common. And units required relief when they were out:
From Shiloh,
A description of the battleground at Ball's Bluff, Virginia in 1861:
Here's the monument of the battle of Groveton during the second Manassas campaign.
A visitor to the monument in 1884 noted the ground around about was still strewn with old cartridge box tins...
At Chancellorsville a Union soldier looking upon the multitudes of dead claims he noted a curious distinction. The rebs generally on the backs, and yanks generally on their sides. Looking at the corpses, he theorized the weight of the cartridges boxes affected how they dropped, viz.
A.E. Strother of the Confederate artillery force defending Fort Gregg (as infantry) in 1865 mentions too no bother about cartridge boxes...
A US veteran of the II Corps noted in April, 1865:
The comments about the soldiers jamming their pockets wish spare ammo packets reminds me a little of the G.I.s in WW2. They had their web-cartridge belts, with pockets carrying 80 rounds in 8-round clips, but frequently carried besides a couple of disposable bandoliers over their shoulders...