To be clear, contractually both cruise lines had no obligation to do anything more than Royal Caribbean did. Carnival made the "out of the box" decision to do more.
But this circumstance, once again, demonstrates another reason travel insurance is a neccesity!
Plus, the only caveat on Carnival's offer to their passengers was it was ncessary for those taking advantage to be carrying a valid passport!
On Caribbean cruises beginning and ending in the US passports are NOT a requirement. But in a situation (like this) where you might find yourself stranded without a passport your ability to travel can be severly restricted. Another teachable moment me thinks.