And, you only truck things that are already in trailers or containers. You don't truck things that are in boxcars or tank cars - the cost of unloading into a trailer just to truck it to a different railroad would be insane.
And, trucks carry, what, 70% of freight in this country? That's the railroads' competition. It's not other railroads. (That said, competition between railroads is not the constraint on railroads passing the cost of fines onto their customers.)
And obviously the primary competitor to shipping via train is trucks, I deliberately ignored it because there’s a huge class of rail freight that can’t really use trucks (non-perishable bulk commodities like coal, potash, construction gravel for cement, bauxite and other minerals) and this is slowly becoming a larger component of their bottom line because they aren’t incentivised to compete with each other, let alone the trucking industry… they are all in their own individual races to the bottom by way of profit maximising efforts like precision scheduled railroading and a general aversion to capital spending inherent in their focus on business metrics such as the “operating ratio” which is quickly undermined by capital expenditure on things like new locomotives and rolling stock. Most of the “parallel running” (two companies can ship from A to B) rail lines where they had to compete with other companies were dumped as not productive enough long ago… (or never built back in the days when it was cheaper, or got rationalised away as part of the government restructuring on the east coast… because railroad history is a whole different subject)