My understanding of the the Passenger Act is a foreign flagged vessel may not charge a FARE to transport US citizens between US ports without a significant stop at a foreign nation. (In essence preventing passengers a direct line "ferry" style service between different US ports, while that voyage makes a profit.) So as long as Carnival refunded (or at least provided future cruise credit) the full amount of the cabin portion of the booking price, they are not running afoul of the law, and would not be subject to the federal fines this change could of incurred without a special governmental dispensation.
On the other hand if the cabin fare refund was not offered without outside prompting, but the cruise line proves the change to the itinerary caused by an Act of God/Nature enroute or that the planned foreign port was closed by the that nation's government, there are provisions under the law. In other words if the Bermudian officials closed the port for the entire time the ship was scheduled to be in port forcing the port to be skipped without enough notice to make an itinerary change to another foreign port, there is no need to offer even a discount off the price paid for the cruise (though doing so is just good customer service).
Disclaimer I'm not a lawyer or other legal professional, so this is not an absolute fact just my interpretation.