I think there are indeed specifics at swimming that may play an important role - first of all the water creates a small (but nevertheless important) pressure difference between the air you inhale, and the external environment. Hence you train your muscles much more to act against the pressure. Then, when swimming you need to adjust your breathing rhythm to your strokes, meaning that you usually breathe with lower frequency than when exercising on air, and you have to compensate for it with a bigger amplitude, training again the breathing muscles, and expanding the volume.