Scale rot is a bacterial infection brought upon by keeping a snake in an enclosure with too much moisture. Other attributing factors are cages which are not regularly cleaned where you have a snake slithering around in its own excrement for prolonged periods of time.

Dry substrate + clean cage= No scale rot