Having a morgue on a cruise ship is a precautionary measure to handle unfortunate situations where passengers or crew members may pass away during a voyage. It allows the ship's medical staff to store the deceased person respectfully until the ship can reach a port where the necessary procedures can be carried out.