When a liquid is exposed to a gas, like water in a glass exposed to air, some of the gas molecules (O2, N2 etc) that hit the liquid will not bounce off but get inside the liquid instead. At the same time, some of the molecules inside the liquid leave and return to gas state.
At equilibrium state, the flow of gas entering the liquid is the same as the flow of gas leaving the liquid, so the amount of dissolved gas inside the liquid remains the same per unit volume. This is the solubility of this gas in this liquid.
The exact value depends on the gas, the liquid, temperature, pressure, etc. Some have more affinity towards each other and some less. Here are some curves for oxygen and other gases. Some gases, for example CO2, have high solubility in water, in this case because CO2 turns into carbonic acid HCO3 which is soluble in water. This is how your body transports CO2 in the blood to get rid of it in the lungs. Since HCO3 is an acid, the body measures blood acidity, uses that as a proxy for blood CO2 concentration, and adjusts breathing speed accordingly.
Gas solubility is strongly dependent on gas pressure above the liquid. To understand this intuitively, imagine gas pressure both pushing gas into the liquid and making it harder for the gas to leave the liquid. So higher pressure which shifts the equilibrium towards more gas in the liquid, ie higher solubility, and lower pressure shifts it to lower solubility.
The experiment described in the question is about removing the gas above the liquid, for example by putting a glass of water into a vacuum tank and sucking the air out. It's not about removing the gas from the liquid, because... how would you do that?
In fact, you can do this experiment without any fancy lab gear, by opening a bottle of sparkling water. When the bottle is closed, it is at equilibrium, and pressure inside is quite high. When you open it, gas pressure inside the bottle drops to atmospheric pressure, and the gas dissolved inside the liquid escapes as bubbles. In this case, the bubbles contain CO2, not air.
The same happens if you do anything that lowers gas solubility. For example if you put a pot of water on the stove, you will notice before it boils, bubbles form in it. This is not water boiling, as temperature would be too low. This is the air dissolved into the water escaping, because warm water has lower gas solubility than cold water.
Putting a container of liquid inside a vacuum chamber is often done to get rid of bubbles when making molds or resin inclusions. In this case the mechanism is different: it isn't about solubility. Rather, there are bubbles already present in the liquid from mixing, but they can't escape because the liquid, usually silicone or resin, is viscous. The lower pressure makes bubbles expand, giving them more buoyancy, so they rise to the top and escape, and you get a nice bubble-free silicone mold.