I suppose any kind of incarceration is a risk for a mentally ill person. If a mentally ill person is placed in a secure setting that doesn't attend to their mental health needs, it's bound to be a risk. Perhaps that's what the person who was speaking to you was saying. A custodial environment is not likely to be good for a person with a mental health problem. On the other hand, society has to be protected, and we need to deter the general population from committing offences.
We always have these competing features with us when we consider the offender population. We're trying to deter. The poor judge is sitting there trying to encourage a general deterrence while dealing with the person's needs. It's difficult to handle these competing requirements. However, that doesn't mean it can't be done. I think we have to adjust our correctional environments to make that happen. I take your admonition that the Mental Health Commission needs to concern itself with people who are in custody.
Yesterday, in a document from the Canadian Criminal Justice Association, I read that we recently had about 38,000 people in custody in Canada. That's a lot of people, especially when you take into account the number who go through provincial institutions at a rapid rate. I can't remember how many thousands of people used to go through Toronto Jail when we had just the one facility in Toronto. Thousands of people went through there every year.
So we can affect them for better or worse.