I would hope that the bridge wasn't open at the time. That'd be a whole 'nother level of screwup.
It's not a very busy line - the refinery is the only rail-served industry on the island - so I'm not sure whether all of those systems are completely automated. It's possible that someone closed the bridge and forgot to reset the derails, or that it was the train crew's responsibility to do that and it got lost in the shuffle somewhere. Or maybe it is automated and a sensor failed, or any number of other possible explanations.
(Note: the map on the Times article is outdated. The bridge west of March Point is a rail trail now.)