The idea is called manifest destiny. It was believed by many that it was the destiny of the United States to connect the two coasts, so it made many happy when Mexican-American war was won and when the US got access to places like California, Texas, Nevada, and other territory that connected the two coasts.