Not going to debate how THAT snake received its scars, but I have a couple animals housed in 40 quart tubs with lids that have a lip that hangs down from the lid - and the snakes squeeze between that lip and the locking lid indention. They have rubbed the color off the scales in what I call "tub rub". Not all snakes housed in this particular tub do this, but two have done it.
So - it is possible to happen from rubbing in the enclosure. I know for a fact that neither of them were burned or injured by prey - I've raised both from babies and watched them actually try to squeeze between this gap and seen that lip running down their neck while they were doing so.