If you read to the last paragraph, the article suggests but does not outright state that the grain is spilled as the result of derailments. So there is some kind of derailment, grain cars tumble over spill all of their grain, and the railroad decides it is not worthwhile to collect it.
This results in piles of grain by the track side which gets wet and starts fermenting, and the grizzlys eat it, get drunk and decide to race trains.
I live in Montana, near a railroad (not the line with the Grizzlies). There are derailments every couple of years on the ~50 miles of track I have visibility for. Two of those were corn/grain that ended up in big piles on the track.
If you look at the shape of those tracks it's more surprising that this only turned into a "minor" derailing, although of course the initial video is sped up quite a bit.
John Oliver had a segment on train derailments a while back (can't find the YT video) and it seems that a lot of US rail infrastructure including the trains are just in very bad shape and there don't seem to be any federal regulations forcing them to invest whereas the environmental damage often ends up being swept under the rug.
Not that German rail is anything to brag about but I can't imagine we'd be allowed to let a train go anywhere near a track that looked like that.
I can't say how the railroads treat cargo, but I can tell you how they treat humans. I got tired of flying and rode Amtrack between Tacoma and Oakland about a half dozen times between 2010-2020 (so a dozen one way rides), until my truck got stolen from their parking lot after they turned off the security cameras and patrols without telling the customers.
On the way back one time we were sitting for hours because a freight had come apart in two places on the only through track. I watched the crews hump couplers brought up from (presumably) Crater Lake past the bar car. Just a day working on the railroad.
They put the train together wrong once, without the crew car between the engines and first class. This meant that first class looked out over the engines. (They duct taped around the door to keep the snow and rain from pouring in.) About a half dozen of us stood there taking turns sharing bottles of wine and looking out the window in the dark as the train went over the Cascades en route to Crater Lake. Very cool.
On the way down one time, shortly after "lights out", there was an excited PA announcement "STAY IN YOUR ROOMS AND DON'T TOUCH ANYTHING METAL" and as I came to I noticed that the lights and ventilation were off and the train seemed to be coasting to a stop. The second announcement that anyone who saw "lights" outside the train should speak to a conductor was no more reassuring. Upshot was the dining car had suffered an electrical fire (coach apparently filled with smoke, but we were spared that in first class). They diverted to some huge rail yard somewhere in the vicinity of Crater Lake where they disassembled the train and put the wretched dining car at the end of the train; they catered in breakfast in Sacramento.
Dunno why all the best stuff happens just north of Crater Lake.
This results in piles of grain by the track side which gets wet and starts fermenting, and the grizzlys eat it, get drunk and decide to race trains.