That's good in theory, but what currently happens is a professor takes a fully paid sabbatical and writes the book for a publishing company. That company sells the book to students for $300 a copy and pays the professor $50 a copy (with a possible sizable amount up front). The professor and friends of the professor requires it for their classes.
The friction that prevents your plan from happening is that the professors won't do it for so cheap. There is a ton of money they can make under the current system.