The US government is allowed to exempt itself from intellectual property restrictions, especially in the interests of "national security".
Meaning they will pay for the usage, at "reasonable and customary" rates, and you can't say no.
I believe this applies mainly to patents. I have not heard of it being applied to copyright, but it's certainly possible.