During the dying process the wax prevents the dye from adhering to the fabric.
During the final stages of the dyeing process, the wax serves as a protective agent, keeping the dye from adhering to the fabric.