I understand that there is a huge amount of money involved, but surely the only stakeholders who benefit are:
1) The publishers, for obvious reasons
2) The authors, as they may get a healthy sum of money for writing a given text book.
3) (possibly) the teachers, if they get bribed into using a particular book in their curriculum.
Lets forget about the publishers, because they are for-profit businesses who do not have the students best interest at heart. We'll also forget about the teachers, because this type of bribing is not common in my experience (teachers I know tend to go for what they already know, rather than the new shiny book which came to them in the mail). Also, we can presume that teachers are not in the business of squeezing every last dollar out of their students.
As for the authors, I don't have an issue with people making money by writing text books. I know a few academics and industry people who are able to pursue more interesting goals because they have money coming in from books they've written. BUT THIS IS THE TINY MINORITY. Of all of the academics who would be capable of writing a chapter for, e.g. an introductory programming book, I would randomly estimate that only 0.1% of them have written a text book that is used in universities. If another 5% of them got together and contributed to an open source text book on the topic, that was liberally licensed and free for students to obtain and distribute, then why should we not embrace that?
I understand that "getting your name out there" is not motivation enough for doing such things [0]. However, surely just doing it for the good of education and teaching is motive enough?
Every now and again I see books come up on hacker news which seem like quite good resources (recently it was a cryptography book, another time it was a link to a github repo for a specific field of mathematics). It would be great if these projects could take off, and become the bibles for their relevant areas. And if a particular academic institution disagrees with the teaching of the book, don't go out and prescribe expensive text books to your students. Rather, fork the (e.g. CC-licensed) book that they are not happy with, and change it. Or better yet, submit a pull request, discuss the issues with the maintainers, and hopefully resolve the issue amicably.
It just astounds me that this is not a thing.
[0] - This occurs a lot in discussions about how companies such as Google try to get artwork from people at zero cost, citing that the artist will get "exposure".