As recently as 1880s the US was still assigning important civil service roles to whomever donated the most money to election campaigns.
The 1880s - 1970s generally featured a more protected civil service, with both advantages (insulation from changing presidents / legislators, maintaining institutional knowledge and competence) and disadvantages (insulation from performance-based hiring / firing, optimizing for bureaucratic rules became more effective than doing a great job).
The latter of which and anti-government sentiment post-Nixon drove deregulation and more direct executive control of the bureaucracy (e.g. the OPM).
As with all pendulums, we're now again seeing the excesses of affording too much power to the presidency (firing institutional knowledge because their role/expertise isn't currently politically en vogue).
Hopefully post-Trump this will spur reinforcing and insulation of civil service expertise.