Rules that govern negotiations and contracts between railways and rail workers only exist as a matter of law -- law that Congress itself enacted[0]. All of that can be modified or undone on the fly by further acts of Congress.
I think it's pretty gross, though.
[0] https://en.wikipedia.org/wiki/Railway_Labor_Act