Anthropic can certainly make the call to deny access this way, but then the US govt can choose not to make contracts with Anthropic. So what's the issue?
The whole reason this is a story is that the government won't just refuse to contract, it will put the equivalent of soft sanctions on the company because Anthropic refuses to contract.
The sanction is only that the federal govt won't do contracts with them. This doesn't stop Anthropic from doing business with anyone else.