The worst thing is -- the battery designers do this on purpose!
They are asked to. Think about this, though: They have only succeeded so far in packing about one-tenth as much electrical energy into a given volume as would be obtained from a petroleum product, like gasoline or butane. It's rare, but when a butane lighter seriously malfunctions and spews ignited contents, its a flamethrowing disaster.
But, we all want our batteries to be smaller, more powerful, and last longer. We just want the failure modes to be rare and gentle.