How does the RO machine know to keep chlorine, while removing all other substances from the water?
Chlorine is present as a dissolved form, but the dissolved form is in equilibrium with its gas form. The gas form is not removed, and once through the RO, some of the chlorine present as a gas will react with the water to become the dissolved form which is a disinfectant and can be detected with chlorine tests. The membrane isn’t able to detect chlorine, and the amount that passes is variable because the amount of chlorine in the gas form depends on many things, like the temperature, pH, and other things in the water.