That assumes a situation where workers are able to do these things. Sure, in theory everyone could quit, but then they would need another way to earn money.
If employers know that their employees cannot afford to quit or risk losing their job, the whole "the market will fix it" theory falls flat, since there is no market.
Not sure how if this is the case for railroad workers.