Yes, a defective battery CAN explode although this is very rare. The inter-cell connections inside the battery are welded. There must have been a defective weld, a loose connection, which caused a spark. The gas that collects inside a battery is a mixture of hydrogen and oxygen, a normal result of charging. If there is an internal spark, this gas mixture will explode..