While there are certainly incentive problems and simple cruft in that regard[1]...

Generally, writing textbooks is just hard and nobody really knows how to do it. Textbooks as they are usually understood[2] are, above all, books[3], that is, large flowing pieces of prose that tell a story about an area of knowledge in a generally linear manner.

This is not how knowledge works. At least the way I feel my knowledge is organized when I try to explain things is that I have a sprawling weighted (on a scale from “vague association” to “hard prerequisite”) graph with rather compact ideas as vertices of absolutely enormous degree (at least in regions I feel I have a decent understanding of). Only by several iterations of merciless pruning around the desired generating set can I get a subgraph that is concise enough that I have some hope of explaining it in the available time, parsimonious enough that I can toposort it onto the time axis without people’s heads spinning and stacks overflowing, and comprehensive enough that I don’t feel I’ve given people a horribly skewed impression and don’t risk choosing a perspective so narrow that would fail to engage some of them. Then comes the actual work of (choosing a) linearization, which I can kind of do in my head for stories of no more than a couple hours at the cost of something like 15 minutes of confusion-inducing backtracking per hour, but it gets exponentially harder as you go past these limits, and you have to go pretty far past them to reach good writing. All of these decisions are kind of like those in an optimizing compiler in that they really want to feed into each other, but actually letting them do so would cause the process to come to a grinding halt, so you interate and order and apply vague heuristics and make arbitrary choices and your inner perfectionist hates you the whole time you’re doing it. And you get to do this practically from scratch every single time because the given context and the desired focus are virtually never the same.

You might say at this point that this is what I get for choosing a wire representation (books and more generally stories) so unlike the in-memory representation (graphs of associations). That may be true to some extent[4], but it’s also important to realize that what is best for knowledge storage doesn’t have to be any good for knowledge acquisition[5]. In fact, the omission that bothers me most of the ones I made in the book-writing rant above is that I know of some things that are just so cute and smol sitting in my head, but when I try to get them out I either assume so many prerequisites that there’s nothing to get out or end up staring at a plan for what is at best a terse twenty-page essay I’m never going to write. I wish hard for viable alternatives to linear narrative, but I also realize I haven’t encountered any that were nearly as good or universally applicable. You can certainly point people at a pile of short-form hypertext, but that misses the issue of pruning: doing it effectively requires you to already know things you decide to prune and the general layout of the subject on a level that is, in classroom terms, several years beyond what you are trying to isolate; a learner is incapable of doing this or at the very least is going to waste tremendous amounts of time doing a mediocre job of it. (I certainly did when I was learning maths from Wikipedia.) I don’t mean to denigrate anyone’s intellectual capability here, or even dissuade them from literature surfing. Surfing in moderation is useful and efficient. I’m only saying that the apparently obvious solution of switching out books for a hyperlinked card catalogue fails and fails hard.

Teaching and books are hard and nobody really knows the secret to doing them well, even those who are brilliant at them. There are a lot of arbitrary choices (not really, but heavily reader-dependent, including factors unknowable to the writer or even the reader) involved in making a book. We solve that problem by throwing a lot of them at the audience and seeing what sticks to whom. But that means a perfect book is impossible—not “drink the ocean” impossible, but “draw a round square” impossible[6]. The problem doesn’t even make sense; what’s a perfect book to you can be a hideous book to me, and what’s a perfect book for me right now was an impenetrable book for me ten years ago. There are objectively good books and objectively bad books, but objectively perfect is something a book cannot be.

[1]: Nobody is going to count your Wikibooks contributions towards your tenure; also, Wikibooks and MediaWiki in general managed to find that sweet spot where they’re simultaneously so expressive you can’t reliably process them automatically and so limited they don’t make good self-contained books, neither fixed nor reflowable.

[2]: Let’s say pre-1970—I find modern trends in English-language secondary and basic undergrad texts positively cringeworthy, but I haven’t ever had to use them in either capacity.

[3]: Can’t help but be reminded here of Michele Audin’s deliciously snarky Tautology 2.3.1 from “Conseils aux auteurs des textes mathématiques”, <http://irma.math.unistra.fr/~maudin/newhowto.ps>.

[4]: The only tool or process I’ve found which is even remotely adapted to this data model is TiddlyWiki <https://tiddlywiki.com/>, which I tried, but never could get over its many quirks and primitive organizational features to make it useful even for notes to myself, let alone as an interface with others.

[5]: For example, fluent readers of Latin/Greek/Cyrillic-script languages generally work by recognizing shapes of words on a page, often for several words in parallel, but teaching children or non-Latin/Greek/Cyrillic-literate adults to read this way is a famously useless affair.

[6]: This also means mandatory texts for students and even mandated curricula for teachers are an atrocity which sacrifices a whole lot of adaptation capability for a modest bit of ease in detecting incompetence and bad faith. The more often a curriculum is nailed down to the time axis with tests and metrics the worse it is.