Ships travel in a general north and south direction through the Panama Canal, not east and west.
A look at a map of the isthmus of Panama makes it clear why.
While the Pacific Ocean is west of the isthmus and the Atlantic to the east, the 8 to 10 hour journey through the canal from the Pacific to the Atlantic is one from southeast to northwest.
As demand is rising, the canal is positioned to be a significant feature of world shipping for the foreseeable future.