Lisa Cook, who has not been charged with a crime, sought to retain her position, arguing her firing was “unprecedented and illegal.”