Chlorine, often in the form of calcium hypochlorite, Ca(OCl)2, is added to swimming pools to kill microorganisms. The acidic form of hypochlorite, hypochlorous acid (HOCl), is the effective antibiotic:
This means that pool water must be kept acidic enough to allow HOCl to form, but not too acidic (you don’t want the pool to be dissolved by acid!)