Exams for U.S. civil service positions apparently started for some positions in 1883, and here's an NBER working paper that looks at the difference that made in the composition of people hired, by socioeconomic status.
Who Benefits from Meritocracy? by Diana Moreira & Santiago Pérez
NBER WORKING PAPER 30113 DOI 10.3386/w30113 June 2022
Does screening applicants using exams help or hurt the chances of lower-SES candidates? Because individuals from lower socioeconomic backgrounds fare, on average, worse than those from richer backgrounds in standardized tests, a common concern with this "meritocratic" approach is that it might have a negative impact on the opportunities of lower-SES individuals. However, an alternative view is that, even if such applicants underperformed on exams, other (potentially more discretionary and less impersonal) selection criteria might put them at an even worse disadvantage. We investigate this question using evidence from the 1883 Pendleton Act, a landmark reform in American history which introduced competitive exams to select certain federal employees. Using newly assembled data on the socioeconomic backgrounds of government employees and a difference-in-differences strategy, we find that, although the reform increased the representation of "educated outsiders" (individuals with high education but limited connections), it reduced the share of lower-SES individuals. This decline was driven by a higher representation of the middle class, with little change in the representation of upper-class applicants. The drop in the representation of lower-SES workers was stronger among applicants from states with more unequal access to schooling as well as in offices that relied more heavily on connections prior to the reform. These findings suggest that, although using exams could help select more qualified candidates, these improvements can come with the cost of increased elitism.
From the conclusions:
"Our findings have implications for the broader debate on exams and meritocracy. Allocating opportunities based on exams is sometimes described as an equity-efficiency panacea, helping select the most qualified candidates while simultaneously increasing the representation of lower SES individuals. Our results challenge this view: although using exams could, in principle, help select more qualified candidates, we show that these improvements can also come with the cost of increased elitism. More generally, our findings show that adopting less discretionary selection criteria might not necessarily help the chances of lower-SES individuals.
...
"Importantly, while we investigate how exams shaped the social origins of government officials, an important question that remains unanswered is whether the poor themselves were on net made worse off by the reform. The answer to this question is not an obvious one for a variety of reasons. For instance, individuals from disadvantaged backgrounds might benefit the most from having a well-functioning state, even if achieving this efficiency implies that they might lose direct access to government jobs. "
***
This paper makes me think of an earlier paper, about the historical introduction and then abandonment of a national exam-based school choice system in Japan, where the result of national exams was that urban students filled more of the places...