In my engineering school (France), teachers write their own textbooks and make them available to us as PDFs. You can pay for paper version at the school's printer (~150€ per year, and then you'll have all the textbooks for your year, and trust me, many students find that very expensive, especially when you only get 3-4 textbooks some years). In the university I went, it was the same, except that the only teacher who had written a textbook gave it to us for free (300 pages). The rest of them gave us their PDFs.
That's why, would a teacher ask us to buy a book some insane amount of money, students would not understand, and at the end, not buy the book. Moreover, what do the US teachers gain from this? I truly don't understand how they support this racket.