Judges ruled that the Office of Personnel Management lacked the legal authority to fire employees of other departments and agencies.