In my Ethics course I always have a class on government ethics, which I basically teach as a look at civil service, which, of course, was created in order to be an ethical instrument of government, and which has all sorts of ethical regulations in place to keep it so. In discussing the background, I look at the Star Route scandal, which was the government corruption that finally did the most to convince people of the need for civil service reform. Originally, of course, we were on a patronage system, or what is usually called a spoils system ("to the victor go the spoils"). When a new President was elected, practically the entire administration would be replaced. Presidents could, and sometimes did, make exceptions for exceptionally good officeholders, and more exceptions tended to be made when the previous administration was of the same party, but there were always large numbers of appointments to be made. So if you helped the President out while he was still campaigning, or pulled a few strings for him, you would likely be appointed to a government position when he came into office. If you did him a really good turn, you would get a nice customs inspector position, which paid reasonably well but beyond that allowed for commissions. You could get very wealthy very quickly with a job like that.
The disadvantages of the spoils system should perhaps not be exaggerated. After all, the US still has a spoils system -- ambassadorships and advisory positions are the choice plums these days -- and there's an argument to be made that it's a good way to increase the chances that important positions will go to competent people, or at least to people ambitious enough to try to be competent, and it does mean there will be no lower-level sabotage of higher-level decisions (which is an argument, for instance, for keeping ambassadorships as non-civil-service positions). Indeed, if you think of all the disadvantages of bureaucracy that you can, many of them are avoided by a spoils system, for the simple reason that it forces the bureaucracy to reset almost completely every new administration. Nonetheless, the ethical risks of such a system are very real and obvious to any thinking person. Corruption is inevitable in such a system, and while there are plenty of ways to handle this on an individual level, the system is especially vulnerable to collusive or condoned corruption organized by groups or factions. The most notorious of these occurred with star routes.
A star route gets its name from the fact that it was marked with stars (***) in the postal listings. Inland mail was not handled directly by the U.S. Post Office, but was contracted out to stage and coach services. You may remember the Pony Express from school. Pony Express riders weren't government employees; the Express was the fast mail branch of a freight company, which eventually took the name of the Central Overland California and Pikes Peak Express Company, who held a number of delivery contracts with the U.S. Postal Service. The company hoped to add exclusive fast mail contracts with the Postal Service, which is why they went through the expensive and difficult organizational hassle of trying to build a system that could deliver mail from one end of the country to the other in times so short that they were usually considered impossible. The company never actually managed to get the exclusive contracts, because they didn't have the political connections; the contracts went instead to a partnership between Butterfield Overland and Wells, Fargo & Company. That was an unusual sort of situation, because they were trying to create a new kind of postal contract. Star routes, which were contracted for less populated southern and western areas, by law had to be auctioned to the lowest bidder who could prove that they were capable of delivering, and once the contract was had, the only conditions were that the delivery be performed with "due celerity, certainty, and security". Auctions have always had the problem that they can be rigged by the interested parties, however, and this is precisely what happened after the Civil War -- the potential candidates would collude to make sure that the lowest bid was very high. If you could get the postal officals on your side, either through bribery or through political string-pulling, you could make the Postal Service pay through the nose. And people did; the spoils system made the political string-pulling and getting wealthy on government contracts quite easy.
Investigations were begun under the Grant Administration, but the investigations were derailed by bribery, and as it seems likely that several very important officials in the Grant Administration were involved, nothing ever came of it. The expense of the corruption, however, made it so that it continued to be a big issue. Hayes put a stop to new star route contracts, and Garfield launched a full-scale investigation. Garfield, of course, was assassinated. The reason had to do with spoils system, in fact, although not directly with the star routes themselves. The Democrats had begun to bounce back from the Civil War, so locking in the Presidency increasingly required Republican unity. However, the Republicans were divided among themselves. Garfield was one of the Moderates, who were pushing an anti-corruption platform that included eliminating the spoils system. The Moderates had the upper hand, but needed the support of their opposite number, the Stalwarts, who defended the spoils system. Because of this, Garfield chose Arthur, a widely respected Stalwart, for his running mate. The Stalwarts hoped that this would mean that Garfield would at least compromise, but as it turned out, Garfield was not the compromising kind. In any case, a mentally disturbed man named Charles Guiteau had done some campaigning for Garfield, and he expected his spoils. When it became clear he wasn't getting any, he shot Garfield in the back, and reportedly shouted as he was led away, "I am the Stalwart of Stalwarts and Arthur will be President!" The Stalwarts were now the ones in charge. To the surprise of everyone, however, Arthur the Stalwart managed to do what none of the Moderates did, and perhaps what none of them could have done: he forced the reforms through. The assassination had apparently convinced him that something absolutely had to be done, and Arthur the Stalwart broke the Stalwarts. His most famous act in this regard was hammering through Congress the Pendleton Act, which established the Civil Service as a non-appointed executive for all but the highest positions in government. But he also pushed so hard on the star routes investigation that no amount of bribery could turn it aside. The conspiracies were shut down and prosecution trials were held. Alas, almost no one was convicted; Arthur could terrorize the executive branch into doing the right thing, but the courts have the ultimate say in such matters, and almost all government officials involved went off scot free, being defended by lawyers like Robert Ingersoll who could work the court system. But the mere fact of doing what he could to kill government corruption should earn Arthur a relatively high place on any list of the greatest American Presidents. Mark Twain once said of Arthur that no one had ever entered the Office of the President under such suspicion or left it so respected; this was a bit of an exaggeration, since you don't overturn political systems without making bitter enemies, but it is true that the public was tired of the sort of corruption they could see in things like the star routes scandal, and Arthur was the first one to do something that wasn't merely a band-aid solution.
Star routes continued -- technically they still exist, although since 1970 it has been under a different name -- but the fraud was shut down. Civil service is susceptible to corruption, but it is a different kind of corruption, and it is at least resistant to the large-scale collusion and winking that infected the patronage system it replaced.
All this has been coming to mind as I've been reading Haycox's The Adventurers; the protagonist, Mark Sheridan, is trying to make his fortune in Oregon, and one part of his plan is the establishing of a western Oregon mail line. The ins and outs of establishing such a business are actually one of the most fascinating parts of the book. The book is set earlier than any of this -- about three-quarters of the way through, Oregon gets news of the Battle of Appomattox -- but one sees precisely the things that will make the later problems possible -- the need to be not just provably competent but to curry favor, the power of having a Senator in your debt, the cunning and calculating use of favors and personal connections to get rich.