The concept most definitely didn’t originate with Pratchett, but he did use it to devastating effect in Night Watch. My recollection is of stories of the Mexican police apparently using CocaCola in the same way in the late 70s/early 80s, along with the telephone book/truncheon beating.
I did read a lot of thriller novels of dubious provenance in my teens, though.
Revenge, psychological warfare, trying to draw “confessions” or to get prisoners to identify other enemies of the state, sadism or sometimes simple boredom on the part of low-paid prison officers. There are any number of reasons why it could be used. And they don’t need to leave marks to send a message. The message gets out easily enough anyway.
Hanging from limbs is very dangerous and leaves all kinds of marks. The famous example is stigmata. Jesus could not have been crucified through his palms as they couldn’t support his weight and would tear through the palm completely. Even hanging upside down for too long by the legs can cause damage. One of the famous tortures used by the US is to have the arms tied behind the back and then elevated to shoulder height. Just staying in this position for too long can cause rotator cuff tearing.