It's a little of both. There are some standard maintenance procedures that can't be done while the ship is in the water, such as work to be done on the propellers or the outboard parts of the drive mechanism. They also use the drydock period to do major renovations to public areas which would have to be closed to passengers while the ship is sailing. All cruise ships are drydocked regularly for this type of maintenance. Usually every 2-3 years.
On both the Magic and Wonder, they changed the theming of a couple of the bars, and the coffee house, among other things, during the last drydock.