Keeping atmospheric pressure stable. When you go sufficiently deep into the ocean, the change in pressure messes with the human body - the Bends, bubbles in your blood; that kind of thing. This was an early (albeit unsuccessful - right idea, but the technology just wasn't there to make the suit wholly sealed but still mobile) attempt to protect against that.
Ever tried to breath when you head is in atmospheric while your chest isn’t?
For example in a pool: swim straight upside in the water, only the head is above. Your chest will be approximately 0.5m below the surface, probably more or less. So you have a pressure difference of just 0.05 bar between the intake (mouth) and the location of the target reservoir (lung). It’s a very noticeable effort you have to overcome with your breathing muscles.
And now imagine being just 20m deep with atmospheric pressure at your head. That would be a pressure difference of 2 bar. You probably won’t be able to inhale anything.
When scuba diving, the air you are inhaling has always the same pressure as your surroundings. When you dive at 40m you are inhaling air with a pressure of 5 bar (that’s also the reason why your tank is emptying much faster at that depth).