It balances out because CO2 and Oxygen are gasses that happen to be disolved in the water. It is constantly going in and out of solution at the water surface. The mixing speeds this process by increasing the surface area of the water. Also, since the air we breath is very high in O2, more of that gets in the water.