I am not sure about this but I think if the ship was in port the close in defences would probably turned off. I am assuming that these rockets were fired at close range. I could be wrong though.
Sorry for the double-tap posting but I meant to say that they wouldn't want bullets to be flying out into the host country's port or city. I dont know the spelling but the CWIS's rounds probably fly about 5 miles and there could be some colateral damage if the went off in port.
I used to know more about it but I am sure some other Navy guy could answer this.