Here's the dirty secret: with the teacher's edition there comes access to the solutions and a bank of exercises and test questions. If there's a set text it's likely that the students pay for the convenience of whoever teaches the class.
If your instructor uses Tanenbaum's perfectly good question about page eviction strategies from "Modern Operating Systems", rather than writing (and debugging) essentially the same question over again, they can spend more of their time talking to you and helping you.
Also, some set texts are really excellent, and the instructor would not be able to produce as good a resource themselves. Some people are better teachers, others writers. Writing good, unambiguous questions that produce decent answers is much harder than it sounds.