Disgusting wretch- While it is true that students were physically punished for the sake of discipline, torture was not a common practice in Hogwarts. Dungeons, you see, were mainly created as the final defensive position to which the student and teaching body could retreat when outer fortifications were overcome. In fact, some of the rooms were simply utilized as vaults, treasuries, water-cisterns or even latrines.