It is by no means obvious that a lower-cost book (yes, like my own) works less well for students than a higher-cost book from a big publisher. Some would put that point more strongly.
Yes, I know that professors do not care much, if at all, about the prices of the textbooks they select for their students, but that is not the only reason that prices are so high.
Another factor is that the industry is similar to venture capital and pharmaceuticals. The organizations that fund projects in these areas incur heavy expenses on failures. A lot of textbook projects fail. The author may not even finish the book. Or it will flop in the market.
For a VC firm to stay in business when most of the companies that it funds wind up failures, it has to earn spectacular returns on its successes. For a pharmaceutical firm to stay in business when a lot of its research fails to yield a marketable compound, it has to charge a lot for those drugs that do make it. And for textbook publishers to stay in business when many of their projects flop, they have to charge a high price for the books that do sell.
Advances in technology have made it easier to produce a textbook at low cost. However, by the same token, it has probably increased the probability that any given textbook will fail to get a toehold in the market. So the overall economics of the business still requires publishers to absorb a lot of failed-project costs.