Marketing is another aspect. People expect a cruise to hit as many ports as possible. Stay long in one place and you have to eliminate another stop.
Sure, a cruise could spend more time in a port - say Cozumel - but then they'd have to eliminate a port from the schedule. Time is time after all, and I do recall more than one cruise where we had to go full speed overnight in order to reach the next port in time.
And as Svein notes, ports charge a ship for the time in port. In some cases the pier is needed for another ship. Many factors involved.