If it is so conceptually easy, then the government, if it is smart enough, should be able to write its own OS patches, since it already has the data and it already has the OS image.
What am I missing?
Not even remotely close to accurate. Apple's code is proprietary. Only Apple knows how to modify it. The only way someone outside of Apple could modify it is if Apple gave them the source code. (Ain't gonna happen.)