Cas, they have done this but it is rare. The instance that comes to mind was during the hurricanes. Most notably hurricane Ike that came through Galveston. They moved one cruise to leave from New Orleans instead (they provided busing I think) and then for a while they left out of the port of Houston (which is by no means a big deal) They also did this in new Orleans when they had that barge stuck in the channel and had to move embarkation of the Fantasy to Mobile (again they provided bus transport) For San Juan, I don't see how they could change embarkation port due to the logistics of doing so there. Its different then say Miami versus Ft Lauderdale (assuming something force the port of Miami to close.)
It goes back to things being unpredictable. Anything can happen (remember the refinery explosion in San Juan?), and the cruise lines are very good at altering things to the best work around possible.
Carnival Cruise Lines:
Fantasy 90, Celebration 95, Victory 05, Conquest 05, Spirit 6/06, Freedom 6/08, Holiday 7/08, Victory 6/09, Valor 9/09, Dream 6/10, Splendor 8/10,Conquest 8/11,Magic 11/11,Triumph 4/12,Spirit 7/12,Freedom 11/12, Triumph 2/13 - The fire cruise, Magic 1/14, Freedom x 2 6/14
NCL Dream October 2006, RCCL Mariner OTS June 2007, Celebrity Silhouette 2013