You clearly do not live in an area with a large homeless population. Many libraries are effectively under-resourced homeless shelters. Yet, no requirement to have a library card to get in. Information is still open to the public.
2. I don't know the laws of your jurisdiction, but banning a whole group of people from a public place would, by definition, not make it a public place.
3. The overwhelming majority of librarians view libraries as a service for everyone, including the homeless[0].
[0]: https://www.ala.org/sites/default/files/aboutala/content/olo...