When I was a student, I remember feeling that something wasn't quite right about my professors assigning an expensive textbook that they had written. At the time, I didn't know where the money went or how the price was calculated, but I suspected that the professors were making additional money over and above the salaried compensation that my high tuition was helping to pay for.
The practice of professors assigning their own textbook started during my first year of undergrad and continued throughout my graduate degrees. It became so commonplace that whatever reservations I had about the practice seemed to be outweighed by the fact that it was widely accepted.
But I recently ran across a post on InsideHigherEd about the ethics of professors adopting their own textbooks for their classes.
"Does having a financial interest in the book mean it cannot be adopted? No. But it does mean that, for one’s own institution, when a professor assigns (or a committee selects) a book in which there is a financial interest, royalties should be foregone to avoid both the appearance, and the actual, conflict of interest. This can be achieved by, ideally, offering the book at a reduced price (easy to calculate, as royalties are a percentage); by having the publisher deduct royalties for that portion of sales at payment time; or, if self-published as print-on-demand, by offering the book at cost."
This seems like a good middle ground. Many professors write their own textbooks because they are frustrated with what is available, so there should not be an outright ban on the ability to adopt their own textbook. But it makes sense for professors to forego royalties gained at their own institution to avoid a conflict of interest.
If the textbook is truly a great book, then it is likely that other schools with adopt it, and the professors can still make full royalties from other schools. This means that the incentive to create great work is still there.