O'Reilly makes more on e-book sales directly through their on-line store then they do on print. However, every e-book they sell via Amazon, their margins are very, very different. Here's a rough guide for a $40 book:
* O'Reilly E-Book Online Store: Approx 99% margin or $39.60
* O'Reilly Store selling print book (bulk print discount assumed): 95% margin or $38.00
* Amazon selling print book (bulk print discount assumed): Approx 90% margin or $36.00
* Amazon selling kindle e-book: 35% margin or $14.00 (minus the Amazon processing fee so it's actually worse)
Odds are the bulk of O'Reilly e-book sales are probably done on Amazon, where the margin is AWFUL. The constant huge sales by O'Reilly are a way to recoup the painful margins insisted upon by Amazon.
Yeah, Amazon makes boatloads off of kindle book sales.