The big motivator was the California Gold Rush (1849). Before the railroad, there were three ways to get to the west coast: (1) cross country in a wagon train (there were several routes, including the Oregon Trail); (2) by sailing ship around Cape Horn; and (3) by ship to Panama, across the mountainous and disease-ridden isthmus, then up to California in another ship.