Maybe the battery was damaged or had some sort of manufacture defect, and somehow the removal of the batteries damaged even further to explode.
Idk how different batteries work, but if somehow you sort circuit it internally it could swell and explode. Like those videos of laptop batteries.
I guess this was a power bank
https://youtu.be/3zgy2JLjTXE