Recently, I became aware of a Java programming textbook Introduction to Programming Using Java, Seventh Edition which is to my surprise, free as in:
The most recent version of this book is always available, at no charge, for downloading and for on-line use.
Question: Why would the author (David J. Eck) make this textbook free?
I have found that almost always, authors of academic textbooks prefer to make money from sales of their textbooks, rather than writing a textbook which is available freely without cost. (I don't have any statistics to back up this assertion. However, throughout my undergrad and my PhD studies, in about 95% of the courses which I took, the prescribed textbook was published by an academic publisher such as McGraw-Hill, Pearson or Springer.)
Closely related question: Massimo Ortolano claims in this comment that most authors would not be able to make much money from sales of academic textbooks they have written. Can someone give me an estimated amount of earnings per textbook sold?