If CIA or NSA is actually breached in a way that is damaging and embarrassing, we wouldn't hear about it. The reason why we hear about it is narrative-building.
Spies hate change. If they gain access to a restricted system, they’ll never say a thing about it, even after they are discovered and their path closed.
In general they’ll prefer to maintain and protect access to something or someone rather than allow it to become public, or be noticed by whoever is in charge of defending it from them. They might even invest in that someone’s career.
They will help things get noticed only if that furthers their interests. I don’t think that’s very common.