In Egypt the axis can move up, attack the ship in port, back out of the city, and the ship will remain in port allowing the axis to attack again the next turn.
In Gibraltar and Malta the axis needs to send a unit, either amphibiously or an air unit, and occupy the city before the naval units will leave. This gets expensive, an amphip assault in, with a naval unit defending, and a transport out, or a operational air unit in and operational movement out.
Is this a bug or a feature?