The wax keeps water from leaking as it passes from the toilet to the drain pipe. It also seals against foul sewer gas odors. A wax seal will often last the life of the toilet, 20 or 30 years, without needing to be changed.