The two end stations existed, and enough in between the make the railway feasible. Then the existence of paths to two big cities made some villages grow, and grow, and grow.

the two end stations exist because people were already there, they didn't build that railway across the US before these areas were settled.

What you're arguing is that there are towns that would pop up around these railways after the fact, and while that's true, they would also pop up around water, gold, and other natural resources.

It turns out there's lots of reasons why communities form, but one thing we know for sure is that railways require demand FIRST, not second.

The USA has several many towns and cities which were built because of railways.

Railways induce demand, both for work for the railway (moving trains, moving goods between trains, services for passengers), and for the excellent transport connections they provide.

https://en.wikipedia.org/wiki/List_of_railway_towns_in_the_U...

please re-read my post, you misunderstood it.

Some demand has to be present first, sure. But "not second" doesn't follow. No law prevents the planners from expecting demand to grow, and basing their decision to build on that.

yeah, because second doesn't necessarily come after first!