Why was it so important for the US to have a canal through Central America?
Shipping times and costs from the East Coast to the West Coast of America was greatly reduced. It enabled Naval forces to move more quickly from East to West.
Around Cape Horn was the only way to the west Coast without going overland. Often the weather was bad and ships were lost or delayed. Shipping by water is more cost effective than shipping by land.
Taking materials from the west coast of America to markets in Europe can save many thousands of miles of sailing by going through the Panama canal.