You have to remember how railroads evolved. They did not start as nationwide transportation systems. Originally, they were extremely short-line. Boston to Worcester, a distance of 26 miles, was a major line at one point. Each city, large and small, started its own railroad and there was no standardization of gauges, track, freight, timetables or anything else. (Remember that each railroad had its own time until nationwide time zones were put into place, I think in the 1880s.)
In addition, railroads were created under state charters, so that they could not operate out of state even if they wanted to. There was no national body of law to regulate interstate railroads; nothing like this had been needed before. (Even canals were state-chartered.) The slow development of railroad law from a series of local and state regulations to a nationwide standard (which was never really achieved in the 19th century) is a major theme of the Gordon book I mentioned earlier.
Each railroad competed with all the others. Large cities had multiple railroads and that meant multiple railroad stations. Chicago had half a dozens stations in what in now the loop; the multiplicity of tracks ate up huge amounts of valuable downtown space. If you needed to transfer from one railroad to another – and you almost always did in the 19th century – you had to physically transport yourself and your baggage from one station to another. The title of Gordon’s book, Passage to Union, refers to the creation of union stations where several railroads came together, facilitating the transfer from one to another.
This was not so easy at state boundaries. Dozens of little towns sprang up that were at state line transfer points where one railroad came to an end and another began. As I said earlier, this was an especial problem in the south during the Civil War. For another look at this, try Sinews of War: How Technology, Industry, and Transportation Won the Civil War, by Benjamin W. Bacon. Any of the big books on the war, Shelby Foote’s, for example, will also deal with this somewhere in their mass.
It wasn’t until the end of the 19th century that the growth of railroad trusts starting consolidating dozens of smaller railroads into true national systems. But there were still hundreds of short-line and specialized railroads in the country that kept to the old gauges, often because they could afford nothing but the older, cast-off equipment from the bigger railroads.
The transfer of freight and passengers from one gauge railroad to another is extremely well documented historic fact. There is a huge amount of collaborating evidence. Read a book. Better yet, read several.