Originally, Porta Meridionalis, or the Southern Gate were directly on the seaside almost all the way up to the 17th century.
They were used as a delivery point, but were also attributed as the Secure door, as they ensured the possibility of fleeing by sea in case the palace was attacked from the mainland. To access this gate from within the Palace, you have to pass through the Substructures, and they lead out onto the waterfront, or as the locals call it, Riva.
In modern times, they have shifted to being the main gate of the palace, as the tourists pass through them most frequently to start their guided tours with local guides.