It was the railroads themselves. At one time railroads were the strongest, richest corporations in the US and they made all the laws that concerned them, like the oil companies today. If you read about them you'd be surprised at the greed and corruption. They even got huge govt. subsidies to maintain their track and build new track.
In the early years of the 20th century it became possible to ship goods by truck. The railroads could have OWNED this! They could have put truck trailers on flat cars and carried them across the country much much cheaper. If they'd done that, we'd use trucks today only to deliver goods locally, from the railhead. But the railroads saw themselves as being in the railroad business, NOT the transportation business.
When airlines came along, after WWII, rail passenger traffic plummeted. You'd think railroads would miss the passenger business that was taken away from them, but in fact they wanted out of the passenger business altogether! They didn't make as much money on it. So the govt. had to pass laws making freight business contingent on carrying passengers. Finally, in 1971 they got the govt. to take over passenger business with Amtrak. I don't think Amtrak has ever made a profit.
In the meanwhile, since freight is never in a big hurry, the railroads (and govt.) slacked off on rail maintenance. So even passenger trains today in the US don't go faster than maybe 40 mph. So nobody rides on them. There's still plenty of freight on rails though!
WHENEVER an industry goes south, the Republicans blame unions. When car makers wanted bigger profits they moved out of Detroit to 'right to work' states in the South. That certanly hasn't helped the auto industry! The car companies have made one bad management decision after another! But Repubs blame unions and also blacks.