Since when did the union and what they wanted have anything to do with 'what the law says (or doesn't)'?That doesn’t explain or justify locking out half the train, there is absolutely no law requiring this.
It will be the union staffing agreement preventing use / forcing lock out.