I'm sure this won't get much visibility, but for what it's worth...
Apple has smart lawyers, which made it odd for me to read when they were basing their primary objection on first amendment grounds, rather than the more obvious undue burden defense (and/or reference to this law, and the lack of statute which would compel them to rewrite the OS). But more recently, the government made their real strategy more clear (ie: rewrite it, or give us the code), which made Apple's strategy make more sense. Although the government cannot necessarily compel Apple to rewrite the OS code, they have much better legal footing to compel Apple to give them the OS code, and presumably could write GovOS themselves fairly trivially.
That's where the freedom of speech argument comes in: although the government can, in effect, steal Apple's code (legally), it's much more clearly established that they cannot compel Apple to "say" that it's coming from Apple (in technical terms, sign the code). Without the code signature, GovOS cannot be pushed onto, or run on, iOS devices. In essence, Apple was countering the more legally persuasive argument that the DOJ was holding back as their would-be trump card, if Apple fought the initial ruling. Well played, indeed.
For the sake of everyone in the US (and not to mention all the principles the country is founded on), I sincerely hope Apple prevails. Their forethought in legal argument gives me some hope that all is not lost, privacy-wise.