Lead-acid battery guy here...
I see exploded batteries come through the scrap in our warehouse nearly every week. There are a few factors that typically come into play:
Offgassing -
This is the fuel source for an explosion.
Batteries charged at a currents above 0.25C, as well as batteries over approximately 75% state of charge will expel hydrogen and oxygen gasses, due to
electrolysis of the water in the electrolyte. Hydrogen
is flammable and, particularly when combined in a ratio of 2:1 with O2 gas, the mixture is potentially explosive. Demonstration video here. (Notice the difference between hydrogen burning and a hydrogen-oxygen explosion?)
Age -
As a lead acid battery gets older, it becomes less efficient at recharging, and more of the charge energy is converted instead into heat and accelerated electrolysis. Obviously, this causes even more offgassing than in a younger battery. It also causes the battery to consume more water out of the electrolyte during charge, and so aging batteries will require more frequent top-ups with distilled water.
Ignition source -
ANY spark or open flame can potentially ignite the gasses from a battery. Always ensure that all wiring connections are tight, and free from corrosion.
Maintenance -
It's difficult to see because of the shadowing in the picture, but I'd say that there is a distinct possibility that the electrolyte levels had dropped down below the tops of the plates, exposing them to the air. This is a recipe for disaster because, as was mentioned in a previous post, you now have the possibility of open-air arcing between the plates INSIDE the battery.
SPARK + HYDROGEN + OXYGEN = BOOM!
Injuries can and do occur from lead-acid battery explosions. It's always prudent to wear personal protective equipment (PPE) when charging lead-acid batteries - safety glasses at the
very least!