this stuff is vastly easier than traditional weapons development.
if you're in a precarious political position, a homegrown entity that produces these tools can quickly become a threat; the citizens you train/employ will have their own political ambitions, nationalistic tendencies, empathy for their fellow citizens, etc.
there are most certainly situations where it's safer to just outsource your natsec/tradecraft to an entity that only cares about their bottom line.