The factory didn't make explosives, it only made fertilizers. It is stuff that like many chemicals can in some situations be explosive, no doubt.
fertilizers and explosives share a common trait:
lots of nitrogen
for the fertilizer, it's the bioavailability of nitrogen for plants that is the point
for explosives, the point is that nitrogen really, really wants to be N2 again
for explosives, AND fertilizer, when you pack a lot of nitrogen together in a chemical, and then heat it up, the nitrogen tends to figure out how to become happy N2 again, releasing a lot of energy in the process
a fertilizer factory is basically the same as an explosives factory, in regards to the existence of lots of chemical feedstock compounds containing nitrogen grumbling that it is not N2