Seems like everybody is blaming Norfolk Southern, but an accident like this really is a fluke.
It will most likely come out in the end that the railroad did nothing maliciously wrong: they were hauling the same chemicals in the same cars they have for decades, on Federal Railroad Administration (FRA) overseen mainline track, within rated track speed, with freight cars whose running-gear and braking systems are monitored and inspected on regular intervals.
In addition, lineside "defect detectors" every few miles will pick up any kind of malfunction in the train is it passes, and relay the information to the train's crew.
Most likely, a broken wheel or axle on one of the tank cars caused this calamity. Years prior, a hairline crack internal to the steel casting/forging goes undetected, until it eventually causes catastrophic failure of the wheel or axle.
A flat-spot on the wheel can also cause the wheel to fail, or even break a rail from the pounding action.
Also, the continuous-welded rail the Class 1's use is prone to breakage due to expansion and contraction---not as uncommon as you would think.
ToolCat