In a normal war, you don't start off with your military at full strength before the war. Most of your people are new and drawn from your general population, and it's hard for anyone to predict who it will be. Makes it hard to infiltrate ahead of time.
But if you've been fighting a cold war using a wartime-sized apparatus for decades, in which adversarial powers have been trying to infiltrate your organizations the entire time, what happens if they succeed? Get someone into the clandestine organizations in a position to direct hiring. Then hire their own people. They're career bureaucrats, not political appointees, so once they're in, they're in. These organizations are expected to operate in secret, so there is no oversight.
Hanlon's razor and everything, but I'm not sure that applies in a situation where strong attempts at malice are actually expected. It would explain a lot about their behavior in recent memory.