It's pretty easy - the fireworks were probably a pretty small shipment, and were loaded along with a bunch of other shipments into an anjoining warehouse.
I realise this seems weird to people living in a country which has all sorts of extremely restrictive and impressive safety protocols, but in poorer countries, this kind of mistake happens __all the time__.
It just doesn't normally result in much more than a small fire.