i would say that the most likely reason for batteries exploding in a fire is pressure buildup in a confined space, and rupturing the container. i had the same experience as a teenager. one job i had occasionally required me to dump trash in an incinerator, and one day, there were a lot of AA batteries in the trash.
knowing the specific chemistry of a battery isn't really going to be helpful in identifying why the battery exploded in the fire if the battery case is hermetically sealed, because such an explosion will happen regardless of battery chemistry. it's just a matter of thermal decomposition or reaching the boiling point of something inside the battery generating enough pressure to make the container fail. i think that even carbon-zinc batteries these days are also sealed inside a durable container, so the boiling of water inside even one of these will cause an explosion.