It took a big government to build a big railroad for a big nation.
No it did not.
It was Big Government that got the Big Railroad Built
The Pacific Railway Act of 1862, Officially entitled "AN ACT to aid in the construction of a railroad and telegraph line from the Missouri river to the Pacific ocean, and to secure to the government the use of the same for postal, military, and other purposes."
The Act authorized both the making of extensive land grants in the Western United States, and the issuance of 30-year, 6% U.S. Government Bonds, to the Union Pacific Railroad and Central Pacific Railroad companies in order to construct a transcontinental railroad.
The Act granted 10 square miles of public land for every mile laid except where railroads ran through cities and crossed rivers. The Bonds were issued at the rate of $16,000 per mile of tracked grade completed West of the designated base of the Sierra Nevada Mountains and East of the designated base of the Rocky Mountains.
From 1850-1871, the railroads received more than 175 million acres of public land - an area more than one tenth of the whole United States and larger than Texas.
The act specified a gauge to be used by the railroads of "four feet eight and one-half inches." A common gauge choice allowed easy transfer of cars between different railroad companies.
I said this earlier land grants does not make a government controlled railroad.