The railroad was not about trade or knitting America together, though it did those things and sold itself as doing so. What the railroad represented, and what it truly was, was a method of land speculation. Land speculation has a long history in America. The founding fathers were mad for it, George Washington chief among them. That's what the railroad really was. For every two acres of land the railroad passed, the operating company was granted one. Useless in 1862 but a potential fortune if you could get settlers out there and bandits and troublesome neighbors cleared away.
How else does one make a fortune from a country of cheap land and high wages? There's two strategies. The south tried to to Make slaves work for free on the cheap land. The Noth tried another tack, to raise the price of land and make workers surrender their wages for the privilege of working it. The second strategy doesn't fully work with an open frontier but you can still grab as much as possible, connect it with rails and wait until the fevered, gun and bible toting hosts have tamed the land and made your worthless acres priceless.
Yes, you are correct in your points. The nation threw money at men to build railroads, and it is one of the most profitable investments ever made in the history of this great nation. Leland Stanford, leaving the endowment that created the university that bears his name being example number one.
In addition to this, there are multiple forces at work:
The first group is personified by Frederick Lander. Lander builds the 'Lander Road' and barely lives to tell the tale, but he blazes the trail that the final railroad will take for almost all of its passage west. The Chief Architects of the railroads were men in the mold of Lander, tough and unflinching. Lander dies a general in the Union army during the War of the Rebellion, and many men like him wear Union uniforms with high rank. Bill Sherman is their poster child. He would have made a brilliant general in the SS in another place and time.
The second is the steel industry pouring out enough carbon steel to lay thousands of miles of tracks, which opens the book on the rich history of that particular industry. And someone has to use that steel to build locomotives, rolling stock, and all the thousands of little components needed to make it work and keep working.
The third are the banking houses required to pay up front for these purchases, who cash in later when the builders run out of funds and end up owning the whole thing anyway. Because Robber Barons have been Robber Barons since time began.
The fourth is the nacent telegraph, whose growth is inextricably linked to the rails, creating a symbiotic bond that won't be broken until telephones and airplanes make them both obsolete methods of personal travel.
Then, you have the aftereffects. The ability to travel effortlessly. Unfettered trade creating the ability, for example, of Heinz Foods in Pittsburgh able to become a national brand shipping fresh foods across the country and having them on shelves days after they are canned. The need for entire industries to service the rail lines and keep them running. The need for crews to run and operate the trains.
And you are very correct this industry has powerful enemies:
The shipping industry, traditionally the right arm of America, fights back against this second appendage that threatens its stranglehold on travel. They are the first to fall, and their high priced legal teams fall victim to Abraham Lincoln's simple one sentence oratory when he argues that the ability to cross a river is equal to the ability to navigate upon it'.
The second are the Southern planters eager to protect their Peculiar Institution. And when a few Fireeaters in South Carolina object to this Railroad Lawyer seeking to open up the West when none of them had voted for him opened fire on Fort Sumter, Lincoln gets his wish. The South fires first, and the North arms for real.
The concept of completely free trade simply cannot exist in a land where there are border checks. It was unacceptable to have rail schedules and minor border checks to look for Negroes hopping the rails to go North to get away from Mass-ah.
The railroad is the greatest threat to slavery, and slavery is the greatest threat to the viability of a national railroad system. Something was going to give, and it did.
Lincoln's first act, before and above any other, was to sign legislation approving and paying for the Trans-Continental Railway to be built by any means necessary. Then he turned to fight a war.
What weapons does the North use against the South? Railroads and telegraphs marshaling men and material across the Union. In addition to fueling the engines of war that outproduced the South in arms and armaments by a ridiculous amount, these men lay tracks up to the edges of sieges and battlefields. Hancock the Magnificent has a personal telegraph operator with him at all times in any position giving him the ability in one crucial battle to order reinforcements to join the conflict instantaneously when the need arose.
This does not detract from the bravery of men weilding arms at the risk of their own lives in battle; but the rails got those men and arms into position and kept them fed.
And when the war is over what happens? Grant takes the White House, the railroad men praise the Great Captain with great praise, and under his leadership is the most corrupt, pro-business, government in US history before Ronald Reagan. And in this environment, the Railroad takes its ultimate form and is the artery that pumps the blood of trade that creates America into the behemoth it becomes.
Oh, one other, minor, note. What makes the railroad work? The Clock. The Clock is the god of America, and was set in place by our Deist Forefathers who worshiped the Great Clockmaker Himself. And each of these men - almost to a man - will be men who come from the East, seeking the Widow's Son. Don't take my word,
look it up. We learned this from the British army if nothing else, just ask
Peachy Carnahan and Daniel Dravot.
What make's America great? We worship the clock, and unfortunately we are running a bit late these days.