In my first year, our chemistry and physics professors both authored their own textbooks for their courses. It was in the days before copyleft and open source, but the physics prof ran a print shop in his backyard, hand-bound the textbooks and sold them to us at cost (which was about 10% of similar published books).
The chemistry prof, in contrast, contracted with a publishing house, and made sure to make a few changes every year, including re-numbering the exercises to discourage buying and selling of old textbooks. The (expensive) textbooks came with accompanying lab-books, which cost almost as much as the textbooks themselves. Lab assignments were only accepted on pages torn out from the official lab books.