The primary function of sulfates in cleaning products is to act as surfactants. This means they lower the surface tension of water, making it easier to interact with oils and dirt. This property allows them to effectively clean surfaces by loosening and removing contaminants.