The reason to ban books is so that people that wouldn't normally cross paths with that book will never be affected by it.
Book bans are not designed to stop people that know about these books and the ideas they contain. They know that those people will still find them and read them.
> I found plenty of information about being gay 20ish years ago in high school.
Lots of kids didn't and they don't know they didn't and that is the point.