The construction of the Panama Canal allowed the US to exert influence around the world and it gave easier access for ships to move between the Atlantic and Pacific. This would make defending new territories easier.
Bonus: It was a huge mistake they made by selling the canal to Panama though. Not only did they lose a ton of money (I'm talking about 35 million dollars), they wasted time and lost some advantages that might have brought them success in the future.