Anthropic has sued to stop Defense Secretary Pete Hegseth from labeling the company a risk after it set limits on the use of its technology.