I quite agree with you. Most open source text books are inadequate compared to pay for books for all the reasons you outlined. I write software and a lot of prose for a living and I have no doubt in my mind that software writing is far far easier than writing a good text book. If you think about it, software can be logically correct but can at the same time be sloppily written while still useful. Indentation doesn't have to be perfect or even present, variables names don't have to be spelt correctly, even algorithms don't have to be perfect and source organization can be haphazard so long as the original author knows what's going on. A book on the other hand not only has to be logically correct, but also look good (check out the CK-12 open source books that California has chosen, the layout is pretty bad), has to be clearly organized and above all read well (with out spelling or grammatical errors). A book also has far more facets to it including text, figures, problems sets (plus answers!), index etc. Anyone who has tried or has written a substantial book will know how difficult and time consuming it is to produce a good text book.