A second judge ordered the Trump administration to rehire thousands of probationary federal workers fired in mass layoffs, calling them unlawful.