That's true, but I'd argue that the land grants are what made it economically worthwhile to develop and maintain the denser parts of the network. You correctly observe that the network itself tracks with population density, but the value of the network is in its completeness: it wouldn't be nearly as valuable if there was a 1000 mile hole in it in the middle of the country.
The main dichotomy in political geography you have in the US is the opposite sides of the Mississippi River. You do have a transitional zone in Illinois (which nowadays as migrated to Chicago), but to a coarse approximation, even the rail magnates of the Gilded Age are unable to build systems that truly cross the transitional zone. In the West, the big prize is connecting the ports on the West Coast with ultimately Chicago, with lesser prizes for feeder lines to bring the products to Chicago. One of the big purposes of the land grants, after all, is to encourage settlement of agricultural lands in the area.
But in the East, the prizes are connecting to the Northeast ports (or Chicago, or to a lesser degree, the other major cities in the Mississippi River). And most of these lines aren't affected by the existence of the Western US. The commercial center, say, an Ohioan is looking towards isn't San Francisco, it's New York City. Rip out the land grant system, and you wouldn't reduce the viability of all of the lines being added in Ohio; although the lines people are working in, say, Indian Territory, will suffer mightily. But the latter are already in the not-dense portion of the network, whereas the former are in the dense part of the network.
It's really not until the mid-20th century that the Pacific Coast takes on the commercial significance that it has nowadays, by which time the railroad trackage of the US is beginning to decline as consolidation takes place.
> Rip out the land grant system, and you wouldn't reduce the viability of all of the lines being added in Ohio; although the lines people are working in, say, Indian Territory, will suffer mightily. But the latter are already in the not-dense portion of the network, whereas the former are in the dense part of the network.
I wasn't just thinking of the far West; I mean also the Southwest. To take an example: I don't think the centralization of meatpacking in the Midwest would have happened to nearly the same degree without land grant-subsidized railroads through Texas, New Mexico, etc. Same for the Gulf Coast with refineries.
But also, I think you're understating the "why" of Chicago being the "big prize" for the West. It's because it opened up California's bread basket to the rest of the country, including the East Coast and European markets represented on the East Coast. The US didn't carry beef, corn, and wheat across the country just to dump it in Lake Michigan; it got carried to Chicago so that it could be sold to points beyond.
Period fiction played on this: Frank Norris never finished The Epic of the Wheat[1], but it was supposed to end in Europe's wheat markets, having started in the San Joaquin valley in the first book. Already in that book, from 1902, is the European market well established:
> “The result is over-production. We supply more than Europe can eat, and down go the prices. The remedy is NOT in the curtailing of our wheat areas, but in this, we MUST HAVE NEW MARKETS, GREATER MARKETS. For years we have been sending our wheat from East to West, from California to Europe. But the time will come when we must send it from West to East."
(Norris confusingly says "East to West" as in "Western Europe.")
Your local library probably has a copy of Nature’s Metropolis, a very well-written, information-dense book that captures much of the reason why it was Chicago rather than, say, St. Louis that became the important link in the railroad system. (In the mid 18th century France and the UK concluded a treaty that made the ‘Illinois Country’ off-limits to Europeans. It depopulated and most people moved to St. Louis. By the time Chicago was much more than an Army fort and a dozen houses, St. Louis was a 100-year old large city).