The reason it was likely done away with is because it was abused. There will always be cases like that, most you'll never hear about. The mentally ill are also an easy target for haters with government power.
To be fair mental illness was far less understood and far more maligned than it is today making the likelihood of mistreatment of the mentally I’ll far more likely.