It's all of this but mostly the flexibility. Rail is a centralized service with unpredictable schedules. Once a truck is full it can be shipped, but rail poses an additional bottleneck. Plus then you also need a driver on the other end anyway to pick up and deliver the trailer.
Rail should absolutely be used more frequently. It just isn't well integrated with trucking right now.