Joules are joules, but what you are failing to account for is the form the joules might take. If the enemy hits the caps and they explode, an amount of energy equal to one projectile launch is liberated.
If, on the other hand, you take out a magazine, you liberate an amount of energy equal to all the shots the ship is capable of taking ALL AT ONCE.
The energy necessary to fire all those shots is probably still on board, but it is likely in the form of a nuclear pile in the reactor, which is shielded up the wazoo. Even if the ship is running a conventional generator, diesel fuel doesn't have a tendency to explode in quite the same way as gunpowder.