A classic reason for not visiting the public library, even if one is aware of the things that are available and one is interested in those things, is not having the time to actually go. Young people have a lot of after-school and late evening activities already in place - music, martial arts, service organizations, social clubs, latchkey, and other such things are designed to take up the time in between the end of school and the return of parents from their workdays. As the age advances, so do the available and taken opportunities for using that after-school time. Some of this is deliberate, as parents believe unsupervised time will lead to undesirable activities, or their children are too young to be safe by themselves at home. Some of this is in pursuit of getting the best education and/or experiences available for their children, to make sure that there's nothing that gets missed out on in their lives that they will regret later. It's sometimes very difficult for a public library to be able to articulate that they can and should have an active role in the continuing education and discovery of children past the point of teaching them to read and to love reading as a pastime.
At school, and then university, college, or trade school, the library as an institution loses a lot of the things it had previously - yes, there may be some collection for pleasure reading, and some academic libraries have started to put on social and other programs in the library space, the nature of the academic library is devoted mostly to the pursuit of studies, so most students visit their campus libraries in search of things to help with assignments, papers, or to have study space to work on those similar things. If all the interesting things are happening outside of the library, or the library gets associated with a host of negative experiences and emotions, that will make them even less likely to then go to their public libraries after college. Assuming they even have the time after taking care of work and their other responsibilities.
Public libraries are also places that demand some time for their most effective use - browsing collections, attending programs, using library computing resources, asking questions, and the like are all time-consuming, and even more so if the people there aren't taking advantage of the expertise and knowledge of the staff to maximize their results for the time they have available. With as many things working against the library at this point, it's a wonder that some people still do choose to take time from their schedules and visit the library.