"But, but... the plant was there first!"
Apparently, the plant was a longtime grain/feed silo for local farmers that expanded their operations to fertilizer storage and distribution later, maybe less than a decade ago. But even grain silos go kablooie every now and then (Atchison, Kansas was the most recent one I recall), and apparently the town's zoning council was not familiar with (I won't say ignorant of) those explosions or the infamous Texas City, Texas disaster when they made land use decisions to allow the encroaching of the plant with housing, schools, and a senior center.
Their lack of forethought ("planning," cough) doesn't excuse what seems to be lax safety precautions at the plant, which I read supported a whopping 8 employees. They already had a scare two months prior that caused a school evacuation:http://media.star-telegram.com/smedia/2013/04/18/07/21/IyWkx.So.58.pdf
It also doesn't excuse the lax governmental oversight at plants like these, at the state and federal levels, and the lax attention to the budgets necessary to keep such oversight properly functioning.