Some police officers/ prison guards are known to beat up criminals unlawfully.This is known as police brutality.
Most likely, the motive behind this is not that they hate or have something against the condemned, but because they wanted to have fun 'experimenting' on how people reacts to pain. They get away with their crimes because they're cops.
Also, when they are torturing a criminal, they cover the close circuit television (CCTV) with tape, so that their unlawful actions won't be captured.
This ensures that they would still be trusted by their more lawful superiors, which makes them a massive hypocrite.