exemption based on mental health very much depends on your circumstances, disorders and triggers, which is why it's usually one of the hardest and most unreliable ways to avoid enlistment in most mandatory enlistment countries.
his condition may very well be real, but the military may still consider him fit for service if they think he's stable enough. he was most likely aware of this and exaggerated his existing symptoms to guarantee exemption.
you generally need a previous psychiatric/psychological evaluation to be considered for exemption then pass an interview with a military mental health officer, so it was probably the officer who caught him.