Why lead acid batteries explode?
Overcharging the battery will result in electrolysis in the electrolyte (water and acid) and this creates hydrogen and oxygen.

If enough gas H2/O2 accumulates in the battery, then vents out from the internal pressure, when it comes into contact with a spark, it will explode.

Hydrogen is very flammable...