I just started watching westerns and I'm hoping for a little background info on some of the inspiration for them.
The railroad industry in the nineteenth century was unregulated and widely despised by the farmers that had to deal with them. The loyal order of Husbandry, better known as the Grange, was a collective movement by farmers and ranchers to bring the railroad industry under some sort of regulation. Early attempts at the state level failed, so the federal government created the Interstate Commerce Commission (ICC) In the 1890s. The railroad industry fought the ICC in the courts and it was not until the Teddy Roosevelt administration, that laws were passed that gave the ICC some teeth. The biggest bone of contention the Grange had with the railroad industry were their high freight rates and the fact the railroads charged higher rates for shorter distance movements. It was more expensive to move a bushel of corn from Iowa to Chicago than it was to move the same bushel from Chicago to the east coast. The operating ratio of western railroads, before effective ICC rate controls took effect, were in the 50 to 55 percent range. This means the operating costs of the railroads were about half of the revenue they earned from moving freight.
The west is a huge place. There were seven transcontinental railroads built between 1867 and 1915. There are interesting stories for most of these railroads. Like, the Denver and Rio Grande railroad started a small war with the Atchinson, Topeka & Santa Fe railroad, when both companies tried to build through the Raton Pass and have the best route between Colorado and New Mexico. The Santa Fe won that particular battle, but the Denver and Rio Grande was able to win their war with the Santa Fe to control the Royal Gorge and gained access to the western half of Colorado.
The classic example of corruption in western railroading was the Credit Moblier scandal when the Union Pacific railroad was built. This scandal is very complex. Its been thirty years since I read a scholarly book about it, but the TL/DR version is this. The initial investors of the Union Pacific made their profit by building the railroad. Since the land it was built through was so sparsely populated, they had no intention of operating the railroad and making a long term profit. They sold out very quickly. The owners that bought them out had a deeply indebted railroad with very little traffic. They soon failed and Jay Gould was able to gain control of the Union Pacific at a low price. Jay Gould was a notorious railroad speculator, whose corrupt maneuvers with eastern railroads, like the New York & Erie were well known. However, the earliest investors and managers of the Union Pacific were so corrupt and inept, they made Jay Gould seem good, in comparison. When Jay Gould lost control of the Union Pacific, in the wake of the Panic of 1893, the Union Pacific was a stronger railroad.
The second biggest example of corruption in Western railroading was the Southern Pacific Railroad / Central Pacific railroad. The charter of the Central Pacific was limited to building a line from Sacramento California to Ogden Utah. The owners of the Central Pacific tried to sell out as soon as it was built, but could not find any buyers. The owners of the Central Pacific used the more open ended charter of the Southern Pacific railroad to expand to the San Francisco Bay area, north to Portland Oregon, south to Los Angeles and east, all the way to New Orleans. The Southern Pacific tried to maintain a monopoly over the railroad industry in California. They used every trick in the book to keep competitors away from the Golden State.
The worst thing the Southern Pacific did was the 1880 Mussel Slough Tragedy. The media had a field day with the nefarious practices used in this incident. A highly dramatized version of these events appear in the 1901 Frank Norris novel "The Octopus: A Story of California". This book helped to tip public opinion towards more effective ICC regulation of the railroad industry. A more recent and sober reappraisal of the Southern Pacific is provided by Richard Orsi in his book "The Sunset Limited: The Southern Pacific Railroad and the development of the American West 1850-1930."