14k sales in 6 weeks is great for a tech book (~5k lifetime being the norm), but on the back of 2 million visitors to the web site, and Mark Pilgrim's reputation, it illustrates why publishing is a tough biz.
O'Reilly pays authors 10% of net income, which is usually 50% of retail. Given Mark's book is going for $30 retail and $17.72 at Amazon, that's about ~$0.88 - $1.50 per book for print (for the sake of the argument, let's assume digital is in the same ballpark). Mark's royalty check for $9225, + whatever advance Mark got (say $5k?) equals roughly $1/book sale for the author (assuming that payment was for 14k sales to date). Given it takes 100s of hours to write a book (and hundreds more to write a good one), making $1 per sale, on average sales of 5k lifetime, or 14k sales in 6 weeks for a top tier author like Mark... let's just say technical writing is not exactly something you do for profit :)
Also of note is the 75%/25% print/digital sales ratio. This would suggest that the free online version is cannibalizing digital sales, given O'Reilly usually sells ebooks 2:1 (http://radar.oreilly.com/2009/08/does-digital-cannibalize-pr...), but I guess you could make a case that the loss in digital sales is made up in extra print sales from the book's exposure online.