In theory, it is almost impossible to fire federal government employees because we want to insulate them from politics. More here. The idea is that otherwise politicians would terminate civil servants who crossed them, perhaps to fill the jobs with loyalists, or cronies that needed their own sinecure.
Unfortunately, we have learned since we expanded the administrative state seemingly irretrievably during the Nixon administration that there are several great flaws with "tenure" for civil servants.
We would be far better off giving our president and governors the ability to fire government employees at will, just like anybody else, and then holding them accountable at the polls for the results.
It does not seem to insulate them from political pressure. We have been reminded of this again and again, most recently with the IRS scandals. Instead, the natural inclination to win the approval of one's immediate peers without the fear of an adverse job action seems to determine the behavior of civil servants as often or more so than the reverse. This is not surprising -- professors have tenure, for example, but very few of them are willing to use that tenure to buck the majority view because, like all people, what most professors (and civil servants) crave is approval.
Of course, it makes it very hard to improve any function of government, because actual performance or lack thereof does not have great consequences, or at least not short-term financial consequences (which is the main device for motivating most employees most of the time). Not surprisingly, the lack of a true at-risk merit system makes it very challenging to attract highly skilled Americans to most government jobs, except perhaps for those that are uniquely governmental in the first place (police officer, foreign service officer, United States Marine, and so forth).
Finally, and worst of all, presidents in particular use civil service tenure as an excuse for their own failings. How can they be expected to change the bureaucracy if they cannot actually fire people who will not comply? How can they make government function more effectively without changing the bureaucracy? Most importantly, how can the "most powerful" person on the planet be held accountable for the incompetence or criminality of civil servants that are almost impossible to discipline?