As I said, the prison population is a very stressful place. There is a lot of risk for violence. Although most offenders aren't imminently violent, there is a risk for violence.
The institutions, because there are a bunch of men in the same place, tend to be controlled by the stronger, tougher guys, and gangs are in control of a lot of the institutions. The drug trade is a big part of that.
A lot of people actually develop substance abuse problems when they come into the prison as a way of coping with the stress. It's a way of sort of blocking out the environment they're dealing with and trying to deal with the stress. Before they came into prison they might have used pot or whatever, but when they come into prison, because of the stress, they move from pot to harder drugs as a way of coping.
In the community, people with mental illness can isolate themselves and remove themselves from the stress of dealing with people. If I don't want to leave my house, I don't need to. So if I have a mental illness and I find it difficult to function in the real world, I can isolate myself in my house. But in prison you don't have that luxury. You can try to isolate yourself in your cell, but you're still in that environment and it's very noisy and you have to go out to eat, so you're to some extent forced to go out into the prison environment. If you want medical care, you need to leave your cell to get it.