I used to sell my texts privately (those that I didn't want to keep as references) to people who were taking the same course the next semester/year. Did pretty decently that way.
A few of my professors used lecture notes rather than hardcover textbooks. Sometimes they were online; other times you had to go and buy what amounted to a stack of paper (sometimes bound, usually not) for between $5-$20. That was sweet

except that you then had to sit there hole-punching everything and putting it into a binder.
I once took a course where the prof was writing his own text, so he made us buy drafts of the text at about $10 each. By the following year, he'd published the text, and the poor students had to drop $200+ each on it. Nor could they reuse the drafts, because he'd changed the problems.