Someone has added the second battery box under the hood, probably to improve cranking due to poor connections or too-small battery cables. It's also possible they left the under-floor box empty. Are the cable clamps under the floor insulated, maybe with tape or some other way of preventing the hot cable from shorting out? If the under hood battery box is big enough, a battery bigger than the Group 1 under the floorboard with more cranking amps might have been used.
Jerry