They do a lot of mental gymnastics trying to run from the idea that their main function is to imprison and take away peoples rights, often without due process.
Medical industry is rife with abuse. They routinely kill people out of spite, torture dying people and their families, and want to be shielded from any criticism... so fuck all the patients and look for reasons they're "not righteous", etc, so you can dismiss them.
It's quite interesting (and disturbing) to see how much culture evolves around deflecting blame and victim blaming.
"Honey, I doubled the salt in the pasta this time, how does it taste?" "Oh, it's really salty". "Ha-HA! I didn't actually add ANY salt!"
(do not actually do this to people you like or who like you)
On an ontological level, psychiatry made a huge leap forward in 1980 with the publication of the DSM-III. One of the core goals of the DSM-III was to address the concerns raised in the Rosenhan experiment, making diagnostic criteria more robust and reliable. While there are still many controversies and shortcomings - most prominently regarding the over-diagnosis of less severe conditions - we now have a suite of reliable, validated diagnostic instruments for most serious conditions. For the most part, we aren't diagnosing or treating patients based on the gut instinct of an individual practitioner; we're using objective criteria with proven inter-relater reliability, guided by the over-arching principle that, regardless of symptomatology, no-one is mentally ill unless a) they're experiencing distress and/or b) they're causing significant harm to others. There are many shortcomings in how psychiatric medicine is practised today, but the era of locking people up just because they behave strangely is definitively over.