I think there's a difference between "university" libraries and "public" libraries in that university libraries are private for students who've paid their tuition (and faculty/staff), while public libraries are for the general public. I don't mean to be snarky, please let me know if you disagree with how the terminology works.
Edit: I also think it may be for safety reasons, they want only those authorized to be there to have access. This is most seen in closed universities where most/all buildings require IDs.
Edit: I also think it may be for safety reasons, they want only those authorized to be there to have access. This is most seen in closed universities where most/all buildings require IDs.