I would agree with what you say except that you infer only violent or mentally ill prisoners go into solitary. That is not the case. Solitary is also used as unreasonable punishment for some of the most trivial non-violent offenses. It seems to depend sometimes on the nature of the prison warden.