School is public sector, restricting free speech in the public sector is a free speech problem.
Private libraries banning books is perfectly fine and theyre allowed to do that. Public libraries aren't private.