Mental fitness is a huge issue for all airlines, especially after the high profile case of a pilot deliberately crashing his Airbus and killing everyone onboard.
Dealing with a pilot suspected of a mental illness requires a very delicate balance between respecting the rights of the pilot with the need to ensure they are safe to operate as a crew member.
Mishandled, as it was apparently done by Delta is not good. Obviously not good for the individual involved but also not good for the company culture. A company culture where pilots think management will as the judge noted “weaponize” mental health investigations, is not conductive to pilots reporting potential mental health issues so they can get help.