These drys dock is legally mandated by the various ship organizations and is part of the overall maintenance due to her age, they need to be done every few years to inspect the hull and other mechanical systems. This is out of carnival control and will still need to be done if carnival wanted to get rid of the ship
newer ships typically need to be dry docked every 5 years and older ships is around 3 years. if you look at the dry dock history, you will see this 3 year pattern.