Your interpretation of the words 'mental illness' must be quite skewed to think this. A large portion of the homeless population in the US, for example, is suspected to be mentally ill. What about the prevalence of PTSD among soldiers? Even those with a mental illness that has a potential to lead to violent behavior are not inherently violent, rather they have stress triggers, and if not triggered will never become violent.
But, when i read the OP, i didn't insert an assumption of what kind of people were referred to, but rather took it as a broad question, the way it was posed. Some see depression, for example, as demonic influence, while others recognize the chemical or environmental influences. This would not require institutionalization, yet it's not uncommon at all.