The incident raises questions around mental health system and court process for dealing with mentally ill defendants