World wide Ammonium Nitrate production is over 20 million tons, surprising to me 40% of that is used for explosives, most of the rest is Fertiliser to grow the food you eat, there are 2 alternatives, Urea, and Calcium Ammonium Nitrate neither are explosive Urea is cheaper, CAN is slightly more expensive.
Why Ammonium Nitrate was in store close to a war zone where terrorism is a risk is unbelievable, it is very easy to make a bomb using it, no doubt other countries will be looking at their own facilities. However it must be realized that Ammonium Nitrate is transported in bulk shiploads of several thousand tons.
In Beirut there was smaller explosion before the main blast, that seemed to be fireworks or maybe ammunition stored close to the Ammonium Nitrate. The force of the blast was said to be 10% of the Hiroshima bomb, the largest ever non nuclear explosion.