Stop in for a cup of coffee

So, what I have read: He reported metal health issues, hearing voices and such. Was in a metal health hospital for a few weeks this summer. A firearms instructor. How is this all possible. Somewhere it said the police knew the guy, divorced 2x with restraining orders to boot. Nobody saw something bad coming?