Sodium bromide is primarily used to prevent or eliminate algae and to establish a bromine sanitation system by reacting with an oxidizer to create free bromine.