It would strengthen the navy and enable the U.S to guard its colonies. I believe the building of the Panama Canal was in time of Imperialism (not 100% sure), where countries were trying to take over smaller or weaker countries to accumulate more power.