The Panama canal offered a quicker sea route between the Atlantic and Pacific coasts as did sailing around the entire continent of South America. This meant quicker troop movements and faster resupply.
you must mean the Panama Canal, it was built to make the transportation of ships easier and faster, both warships and freighters. instead of going around south america, you could go through it!