Ecstasy is due for drydock this October, Sensation would have been due in January 2023. Yes, Carnival might have been able to operate cruises out of Mobile for a couple more months had they kept Sensation instead of Ecstasy, but it might have required more crew members for the extra 3 months - especially since Celebration should be entering service about the time Ecstasy leaves. Ecstasy's crew will likely sign off with the ship.
Carnival bringing Spirit over to the US also made one ship unnecessary.
It may have also come down to the scrapyard saying we need a ship by X to keep their workers from being idled, and/or wanting to take advantage of higher scrap prices. Reportedly Sensation sold for $11 Million, so you don't keep a ship that burns nearly $1 Million/month sitting idle any longer than you have to.