I can't speak for all universities, but my alma mater allows public access on a limited basis. For example, you can apply for courtesy membership if you have a basic need for research purposes. It can be as simple as, "I'm trying to build a static analysis tool, and I need books or publications on ASTs."
It makes sense to me, because one of the tenets of higher education should be to serve in the interest of the community.
I see. In Australia, they tie guest wifi login to one's student email address via the 'eduroam' SSID. This allows students from visiting universities to connect but not the general public.
It makes sense to me, because one of the tenets of higher education should be to serve in the interest of the community.