I'll never forget this fact because there is a King of the Hill episode (10:13) where a mentally-ill, homeless man named Spongy exclaims "Ronald Reagan kicked me out of my mental hospital!" and Hank bashfully tries to justify it as part of winning the cold war.
I remember that episode, seen them all at least twice. I was just a kid when they all were closing but thinking back it seemed like a good thing. I do wonder now where people thought all those people in there would go. I think a lot of people believed they did not need to be there and were getting a free ride as strange as that sounds.
Hard to source this claim exactly but after many discussions on the topic, my view is that people across the political spectrum believed that there were adequate outpatient mental health resources for the newly released individuals.
Either they imagined it was already available or that the money saved on running the institutions would instantly create it (with some left over).
There was a massive underestimation of the scope of the problem.