Railroads have to pay to maintain their tracks based on the wear their cargo trains do to them. Trucks, on the other hand, have the costs of maintaining the road spread onto passenger cars
Nevertheless, shipping something long distance via rail is way cheaper than by truck. In spite of the subsidy advantages truckers get, they still don't compete on price.
The truckers compete on convenience, and time, and door to door service. By the time you handle all the inter-modal swaps, and delays trucks get it done faster. Rail means you go 1)From the shipping dock onto a truck, 2)across town, 3) off the truck, 4)onto the train, 5)wait for a train to be built, 6)wait for train to run, 7)off the train onto the trucks, 8) finally to the delivery dock.
Mr Fuckup can visit in any one of those places, and your 6 box cars of cabbage rots on some siding in Omaha.
And train building can literally take DAYS before your container moves. And it might take days at several points in the journey for unusual destinations.
Still, we are beating the hell out of all our roads with mile long trains of trucks. After every city there is the 20 mile truck sort where each driver wanting to go 1/4 of a mile per hour faster than the next, will consume all available lanes passing.
You will get modded to hell suggesting we get trucks off the road and onto the railroad, because you are attacking someone's life style.
But its a sad truth that we rely more on long haul trucks than any other place on earth.