
To my understanding the main reason asylums existed was as a catch-all for anybody with major disabilities or conditions. Since medicine has evolved, a lot of conditions can either be treated outright (antipsychotic meds, etc.) or only require outpatient facilities. Plus, there were a lot of ethical issues posed by having someone “put away” and the conditions were usually not great and the facilities became dumping grounds.