That was my point. They don't work for him, they work for the Federal Government. Much about their employment is regulated directly by Congress, including their budget. A President can fire a department head, but then what? That might actually not matter at all to the section heads within the NSA. The political leadership comes and goes, but the rest of the organization is self-managing. The Director of the NSA might in fact not be able to run around snapping his fingers and cause the desired effect. They manage their own budget on a blank check from Congress.
Obviously the departments that are overseen more directly by members of the Cabinet then the President has extensive access and generally better control. Except of course Law Enforcement which is all delegated as per post-Watergate rules.
Something else you might not have considered, when you fire the Director, then the Deputy Director takes over. The Director is a military position; the Deputy Director is required to be a civilian. This guarantees that it will be a "career professional" from inside the organization, but who can't be appointed as Director. This means if you fire the Director, the short term effect is turn full control over to the organization. And then the replacement has to be formally Nominated and then Confirmed by the Senate. Whoever you just fired had connections in the Senate to have gotten confirmed in the first place. So firing him upsets those people. So the replacement will likely be further from the President than whoever he fired, because he'll have a weakened hand in confirmation.
Also, the NSA is military, which means most of the President's staff don't have any say at all. Most of what the President wants to get done has to be done directly, and through the Secretary of Defense. And then most of the workers are actually civilians, so he can't give them orders as Commander in Chief. And the Secretary of Defense mostly has to go through the command structure.
Civics is actually interesting to learn about. There are real reasons it is structured the way it is.