I mean as nice as this sounds, our money is spent on all sorts of things we know nothing about. Should we all be provided with the schematics for F-35s?
Any hypothetical obligation-to-make-code-public act could probably be guided by the thinking that went into the parameters of FOIA exemptions, since code is, after all, information.
The CIA, maybe not, but the NSA for sure. All the bulk surveillance and so on being done to Americans in america should be completely transparent to its citizens, so they can be clear that their rights are not being stepped on