Yep, it's most commonly caused by a dirty wet tank. A snake that soaks in fresh water doesn't get scale rot, so it's not just from water. If you have a dirt/mulch type substrate it's probably one of the worse substrates to get wet. I'm not sure how long they have to sit in the wet substrate (whether by water, pee/poo, or both), but it will eventually happen if you don't get things cleaned up.