https://en.wikipedia.org/wiki/Shared_source#Microsoft_Govern...
This isn't that uncommon, and originally this wasn't even necessarily done form a security POV, office source code was shared so governments could build extensions on it for their own internal use before addon's were introduced or when addon functionality wasn't sufficient.
Windows source code including kernel source code was often shared to pass various inspections, and in many cases to integrate proprietary tech such as hardware encryption into the system.