Those agencies were created by law and given a command by law to fulfill a role in the executive branch. The executive branch doesn't get to decide how to organize itself since that would make a mess when the next guy comes up, so laws are there to make sure the structure is kept in a _continuity of the state_, such that just because the head changes, not everything needs to change. You could argue all you want about that, but stability is a desire feature of the state. It not only helps citizens to be able to have long term planning, but also saves the resources by not needing to figure out how things work constantly.
Some amount of stability is desirable, but not an infinite amount. A certain amount of creative destruction is necessary to avoid regulatory/ideological/bureaucratic/oligarchic capture. A completely stable system will fall to the iron law of bureaucracy.