i think it is legal for them to ban books because you gave up your right when you got enrolled into school for instance you cant cuss at school but with you first amendment you can since you gave up yours rights kind of to the school. i hope this helps! if this makes any sense