With Semi's, each separate truck has to endure its own wind resistance independently.
With a train, each rail car effectively drafts the car in front, producing significant reductions in wind resistance for all cars behind the locomotive.
This site (https://www.energy.gov/eere/vehicles/parasitic-loss-reductio...) quotes wind resistance, braking, and rolling resistance as responsible for a 45% reduction in efficiency.
This site (https://www.nap.edu/read/13288/chapter/7) has a table that separates the factors out. Of the parasitic losses, aerodynamic losses (i.e., wind resistance) is responsible for consuming 53% of the motive power.
I do believe there's some benefit from the tracks themselves as well, though. Surely there's a lot less friction (per ton of weight) between the train wheels and steel rails, than there is between truck tires and the road?
Except all freight trains in the US have 6600 HP diesel engines, usually ~6-8 engines per 100 cars from what I've seen (which is mostly coal).
[1] https://www.treehugger.com/cars/rail-versus-trucking-whos-th...