I think this is a misunderstanding. Any agency of the federal government measures success first and foremost by the volume of federal resources it consumes, and by the swelling of that volume over time. This priority is seldom articulated, and it isn't as though the "real" mission is ignored, but the structure of the organization and the incentives to which its members are subject make it obvious. To take the example of the NSA, their commitment to copy all the data is really a commitment to maintain their size at a fixed ratio with a quantity that will grow indefinitely.
Some might say this is a failing of the system, but it's enough to just recognize it as a property of the system. If we want the federal government to do a job, it usually will, but its performance will have this grow-spending-always, mission-as-afterthought quality. That isn't too terrible when the job at hand is redistributing wealth among the citizens: at least there's a chance that the progressive and regressive impulses will cancel out. When the task is actively destructive to the nation and the world, however, the organization must be controlled in some manner. No such entity will limit itself.
We are equipped to curb the excesses of e.g. the Department of Agriculture. However, the "secret" agencies have gotten a free pass from public scrutiny for 75 years. The answer to the dilemma is to end the culture of secrecy. No action of the USA government should be concealed from its citizens. There will be trade-offs involved with switching to this policy. Certain operations will be difficult or impossible when they can't be hidden from view. Those operations are typically counter to the long-term interests of the American people anyway, and the sooner they are stopped the better.
The unsavory, if still limited, view we have now of the actions of these agencies, speaks not of a failing of those agencies, but of our failing to understand their basic nature, and govern them accordingly.