As already addressed in this thread, schools are massively underfunded. Schools do have good quality texts available to the children, but they are used as key texts and to fill classroom book corners, so they get a diet of high quality literature when they are actually in school. Sadly, a lot of schools can't afford for their better quality texts to leave the premises, as so many families lose them, damage them, or don't return them. That means that many school libraries consist of donated books or cheaply sourced books (from charity shops, Vinted bundles and car boots), which naturally might not be of as high quality as the texts which all schools will carefully source to use for their class readers and key texts.
So schools do carefully curate a list of texts for each year group, but they can't afford to offer them out in the school library.
For those children who are lucky to have a rich diet of high quality literature at home, as well as in their classroom, the school library books serve purely for enjoyment and to add some variety to their reading diet. Reading for pleasure comes in all forms. People of all ages enjoy an easy, 'trashier' read from time to time.
For those children who sadly do not have books at home, well any book to borrow is better than no book. I often find these families are the ones less likely to return the books. Maybe it's because they don't value reading at home, and don't look after them? Maybe they end up under the sofa or the bed, never to be seen again? Or maybe, just maybe, some children are choosing to keep them because they don't have any books of their own and they get pleasure from this secret stash they choose to keep at home. If that's the case, those 'low quality', 'trashy' texts may just one day turn a child who is not from a bookish family, into an adult who chooses to buy their own books for themselves and their own future children, because those school library books helped foster a love of reading.
As I've already mentioned in this thread, I choose to buy bundles of books to supplement our school library supply and try to keep it as good quality as possible (but I value variety too, so I pick up all sorts of bundles as long as they are in good condition). I accept that some of these books may only be borrowed once, never to return, but I'm ok with that for reasons outlined above.
Maybe some of the teachers at the school you talk about did the same? Have you ever considered that those books your child borrowed may have been funded by their teacher, rather than the school? In cases where this happens, that's a want on the teacher's part. They want to be able to provide better books for the children in their care, and they are lucky to be able to afford to do so. It shouldn't be an expectation, so schools where staff can't afford to do this or choose not to absolutely don't deserve some of the stick they are receiving on this thread. Some teachers will go above and beyond for the children they teach, but they absolutely shouldn't have to. It's a crying shame how underfunded our schools are, and it's something so many are still seemingly completely unaware of, if some of the comments on this thread are anything to go by.