That's the point. The solution should avoid information not being available. Requiring login will incentivize bots to create spam accounts and move the battle to a new frontier, hurting real people in the process.
Edit:clarification
If thousands of robots suddenly showed up at your local library and started hogging all the books so nobody else could use the library, you can be sure a library card would be required to even enter.
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...