The judge said that the Office of Personnel Management had no authority to order government organizations to fire workers.