then why was he allowed to walk about the streets in the first place?
There are various possibilities....
1) He has not been diagnosed as having a mental illness
2) He has been diagnosed but not hospitalised, either due to them thinking he does not need hospitalisation or they (the psychiatrist) does not know what they are doing (which is highly likely, in my opinion)
3) He was diagnosed and hospitalised, but due to cutbacks they released him
Or could be some other plausible possibility, that I have not mentioned