Libraries are free. (Well, at least most public libraries. There are private libraries for personal use, institutional libraries for internal use, subscription libraries which require membership fees, and others.)
I've visited libraries in a half dozen countries, where I'm not even a taxpayer. I just walked in.
Some services at the library might not be free, including book checkout or making photocopies.
But if you want to make that distinction, then walking around your neighborhood isn't free because in most place you need to wear clothes, and clothes aren't free.
FWIW, I've walked a lot of forest roads without a car or bike. And the biggest littering problem on our sidewalks, by weight, are the escooter riders who simply leave their machines parked in the middle of the sidewalk.
The problem isn't that the sidewalks are free to use, the problem is one of regulation and enforcement.
That's why libraries are both free and well-loved - they librarians regulate the free space.