Then, people often turn around and call self-publishing companies "scams" because everything can be done by hand by the author for free or for cheap.
How to reconcile these views, and those of this article?
The answer is, companies provide value to a certain type of customer.
If you're the type of person who is comfortable doing all of the marketing yourself, submitting to all the right places in all the right formats, hand-designing your book's layout, going so far as to demand a certain thickness of paper, well--traditional publishing is not for you. You're very correct to claim that you will get a raw deal from traditional publishing, in your case.
However, 95% of authors know zero about that kind of stuff. They have no idea how to market their writing. They don't know epub from mobi. They don't know that they can submit to B&N as well as the Amazon store. They don't know how to format their ebooks. They don't know how to handle cover art, how to find an artist, how to find a good editor. Do you think submitting your book to the Kindle marketplace and the B&N marketplace and the Apple marketplace is simple? Maybe it is--but most authors just can't handle it. They'd rather be writing.
The same can be said about self-publishing outfits. Many authors call them scams because they charge money for things you could do yourself or cheaper. Well, that's fine, if you know what to do and how to do it, and you have the time and patience. But many authors don't. That's why self-pub outfits aren't necessarily scams, because they provide genuine value to a lot of people. The important part is being aware that self-publishing mean you're going to be doing much of the legwork of marketing your book yourself, without the cachet of being able to say that someone is publishing you.
My point here is--don't expect to be happy with a business arrangement if you're not the business's target customer. The author of this post by all means should have self-published. Does that mean O'Reilly, or any other publisher, traditional or self-pub, is a horrible scam and not worth it? Hardly. They're very much worth it for the right kind of author. It's up to you to know what kind of author you are and if the profit tradeoff is worth it. For the entrepreneurial-minded HN crowd, self-publishing would be the way to go.
Edit: I should add that it is also on O'Reilly to realize that he's not their target customer. It looks like they obviously didn't figure that out despite his seemingly long and demanding contract.