Things that would be toss-ups or wins for rail are instead pushed to trucking. This would just be wasteful, and not so pernicious, were it not for the serious negative impacts on the layout of our towns that result from favoring trucks so heavily.
Prior to the rise of the Interstate Highway system, most warehouses were on rail lines, or spurs. You'll still find the trackage, or at least the traces of them, in many urban areas throughout the U.S.
In San Francisco, the region near Potrero Hill by the old Fashion Design Centre. The odd street patterns and building perimeters show the former track rights of way.
https://www.google.com/maps/place/San+Francisco+Design+Cente...
I think it's mostly a last mile problem (you'll need big trucks to carry from the station), compounded by the fact that most of the train station of cities and I don't think they is a lot of dedicated cargo train station. Also you do not control part of the schedule: you are dependent on the departure/arrival time of trains. And don't forget the strikes...
Rail traffic is allocated on a timetable, for both passenger and goods trains. The time and route is called a "path" in British English, and reserving one costs money.
A power station might have a daily path from a port to their power plant, as they can reliably use all the coal.
Rail freight companies book many paths between freight terminals, container ports and so on and mix together goods from many customers to run on trains on these paths. Therefore, the timings are reliable, potentially more reliable than by road, but the flexibility is less.
If there aren't any goods to move, the company doesn't need to use the path. (I used to live close to a railway line used to transfer trains containing nuclear waste. The reprocessing plant had a path to run a train every day, but only used it every couple of weeks -- presumably, they don't like leaving the waste at the power station any longer than necessary.)
[1] https://en.wikipedia.org/wiki/Rail_freight_in_Great_Britain#...
The amount of semi traffic from Portland to Seattle on I-5 has exploded, it certainly made driving that stretch a lot less enjoyable.
Many trucks in the US have a bumper sticker that says, "Without trucks, America stops." Teamster strikes, like the León Vilarín teamster strike in October 1972 in Chile, are a disaster for any country and create national emergencies.
The reason this sorry state of affairs exists is because truck traffic is heavily subsidized (highways paid for with taxes) whereas rail traffic is heavily taxed (and the rail companies have to pay for the tracks).
It could be improved by increasing weight taxes on trucks, and using the proceeds to subsidize intercity tracks.