I'd agree with limiting access based on age, but a lot of these laws have a binary if not outright ban on library access.
What's appropriate to a 10, 12, 14, and 16 year old is pretty broad as these kids mature fast in a few short years. I see no reason why any 16 year old should be restricted from any book.
The first time I tried to check out one of those very adult books the librarian called my parents and asked if it was OK. My parents said "Yes. Let him have whatever he wants." They made a note in my account and the next day they let me have have whatever I wanted.
If that hadn't happened I would be a very different, and much dumber, person now.
I don't understand what the issue is with just asking the parents?
I suspect that most of the people responsible for these "bans" don't want that to happen because some parents will approve of things they don't. Most of this really IS an attempted ban rather than just "appropriate age related content" issue. They don't want to control what THEIR kids can see. They want to control what YOUR kids can see.
The notion that the school board would simply ask a parent, then deal with the parents from kid A complaining that they read a book checked out by kid B is out there.
We run our schools to a lowest common denominator system.
We had a better system once (maybe only in this one way). We can do it again.