Patients recovering from major surgeries, pneumonia, or patients who were on a respirator, tend not to breathe very deeply. This causes parts of the lungs to collapse. The technical term for this is atelectasis.