Probably a money issue. Not sure how profitable train systems are. I know that Amtrak has lost money every year since 1971, and many of the metro trains lose money as well. One would think that freight trains do alright, but not sure what condition the track systems are in.
IF they can’t spend a couple thousand on safety equipment then they have no business being in business. One camera facing down the side of train can see a lot of rail cars. Did you notice that low cost home security systems are what took video of the sparking train going by. You know the kind that you buy at Walmart for $500 Dollars. They have no excuse.