You don't end up in prison because you made smart decisions :P
Fort Joy is not a prison for criminals. It is a concentration camp indended for the extermination of Sourcerers, regardless of their criminality.
But yes, the complete lack of any graduation in punishments or consequences between "not caught/get away with" and "I will mindlessly fight you to the death" is not great and I think that does hurt immersion.
There are a couple of complete ingrates in the prison who if you heal their ailments try to fight you to the death.
Dain the drunk only wants healing potions, but if you heal him he gets angry and says he'll fight the grim reaper. Then you kill him and the doctor, because she mindlessly attacks you as well just because he is suicidally dumb.
Mona the diseased woman just tells you to leave when you talk to her. There's no way to know in advance that if you cure her with bless, that pisses her off and she tries to kill you.