Ports are "profitable," but absurdly complex to build and manage. The reason many countries don't have deep water ports is because they can't afford to build one.
However, the economic impact of a port is, without question, a benefit to the Peruvian economy.