One advantage that rails have over pipelines is government subsidies. The government pays for most of the rail improvements and the local towns are responsible to pay for any mitigation such as over passes, under passes. In some cases, the government even pays for the additional land purchases for new sidings, etc, as well as all the environmental studies for new rails.
Train transport still cost more in most cases to the oil company.
The lack of pipeline capacity out of Cushing was driving a large differential in oil prices, central versus coastal.
Oil companies were getting enough extra dollars for the oil on the east coast to justify extra rail cost to get there.
Now with some recent pipeline capacity additions, the differential has fallen from about $20 down to $5.