Shutting down the freight rail system would be a titanic political and economic liability. There is a reason for a body of law which gives the government great power to prevent rail strikes. The unions knew that the government would not likely allow this to happen.
Also, many of the unions voted for the contract, despite knowing its shortcomings, and some unions only just barely failed to pass the contract. This isn't as clear cut of an issue of labor vs capital isn't as some online would have us believe.
8 of 12 unions ratified it. The SMART-TD union, representing ~23k workers, voted it down by <1%, and if you look at the sub-group breakdown, since that union is kind of amalgamation of a 5 unions, some groups voted in favor as well...