I feel bad for the guy, but he certainly brought this setting on himself. One would think that if you are in prison, you can be protected, but prisons are terribly understaffed. I have a very close relative that worked at a miniumum security prison farm (he quit because of the atmosphere) the prisoners run the prison. There is only an illusion that the correctional officers are in charge.
I believe that if you are sent to prison it is for punishment because of your crime. However, The state by taking you also must provide for your health and welfare while in custody.