The Civil Service Reform Act passed in 1883 was in large part an attempt to stop the spoils system of patronage jobs, or jobs filled in support of political parties.
The Federal workforce hiring was based on the merit system and the Hatch Act of 1939 prevented civil servants from engaging in political activities while performing their duties.