The Union Pacific Railroad (the eastern half of the transcontinental railroad) also caused the financial crisis of 1873 (due to construction costs and various corruption and bribery around financing them). It then went bankrupt in 1893.
So, yes, it transformed the country. That didn't necessarily benefit the stockholders and bondholders.
Right, but four years later was definitely caused by the problem of (and shenanigans around) financing the original construction. Even if you want to say that 1893 was too late to be relevant, 1873 wasn't. It was the problem of financing the original construction that damaged the entire US economy.
So, yes, it transformed the country. That didn't necessarily benefit the stockholders and bondholders.