The sad fact of the matter is that the psyche of the pilot is now one of the key vulnerabilities in RPT transport. As other vulnerabilities have been reduced, this issue has increased - certainly in relative terms, and perhaps even in absolute terms.
Pilots are part of society. As mental health issues become more common across society, it’s only reasonable to assume this will also apply to pilots.
We have seen this in all professions - medicine, legal, law enforcement, business, high society, and of course politics. People do something inexplicable and hence unpredictably.