Because air is compressible an air cylinder acts as a spring. When load changes cylinder can move. Oil in the cylinder is much "stiffer". So compressed air is used to pressurize the oil and thus is the source of energy, but the oil locks the cylinder in position when the valves are closed. It is called an "air-over-oil" system.