The civil service process was designed to prevent discrimination in the workplace. By providing standardized tests, the idea is that everyone (regardless of gender, age, race, etc.) would compete on equal footing. The other reason for the civil service was to make it harder to politicians to politicize government. A lot of the services government provides (cleaning streets, mailing mail) need to happen regardless of who’s in office.