When the news broke my first thought was that it reminded me of Texas City. Another ammonium nitrate explosion at a port (although in that case it was on a ship rather than in storage at the port itself).
Storing that much of a combustible material that way doesn't make much sense, but it is a common shipping cargo.
Apparently the ammonium nitrate was seized by customs from a ship after the crew abandoned the vessel and disappeared. Afterwards, customs officials couldn't get permission from the Judiciary to destroy/remove the material (multiple requests were made over the years), and subsequently bureaucratic inertia led to nothing being done.
BTW, Texas City is definitely what I thought of once reports filtered out that officials believed the explosion was due to ammonium nitrate. If anyone is unaware of what happened during the Texas City disaster, I strongly urge them to go read about it and view photographs. Eerily similar to Beirut as far as the material itself and the quantity.