From Imperial Twilight: The Opium War and the End of China’s Last Golden Age, by Stephen R. Platt (Knopf, 2018), Kindle pp. 54-55:
For all the admiration of the Chinese examinations by outsiders, however, by the late eighteenth century the system was beginning to fail. It had always been extremely difficult to pass the exams, but as the population expanded in the Qianlong reign there were far more candidates than before who wanted to take part in the competition, and proportionally fewer government jobs with which to reward them. The competition became more and more fierce, and great numbers of talented candidates were left behind, creating a glut of highly educated men with few career prospects. They generally found unsatisfying work as tutors, secretaries, and bureaucratic underlings, unreliable jobs that required a high level of literacy and education but were transient and depended entirely on the patronage of their individual employers. These men were failures in the eyes of their parents, many of whom had spent lavish sums on their sons’ educations in hopes of their becoming officials and bringing power and prestige to the family.
Furthermore, even those scholars who did manage to pass the examinations might still have to wait ten or twenty years before a position in the imperial bureaucracy opened up to them through normal channels. By consequence, the system of civil appointments became fertile ground for bribery schemes. Those who controlled the appointments demanded huge fees from qualified candidates before they would give them a position—in essence, forcing them to purchase their jobs, and then often making them pay yearly sums to hold on to them. As the practice spread, great numbers of officials began their careers in heavy financial debt to their superiors—debts they were expected to make up for by squeezing bribes from their own inferiors or finding other ways (such as embezzlement) to supplement their meager salaries and pay for the fees and gifts that were required of them.
At the lowest levels, where the vast imperial governing apparatus reached the level of the common people, this pyramid of graft resulted in widespread petty oppression and outright cruelty by minor officials towards the populations they governed—especially the peasants and those on the margins of society, who were most vulnerable to their extortions. Such victims had little or no effective legal recourse if they were harassed or beaten or had their meager property taken by greedy officials. All they could really do, if they were desperate enough, was to revolt.