I'm not so sure about that anymore. I recently heard a radio interview with the head of O'Reilly, still Tim O'Reilly I presume, and he said that the illegal content out there was actually helpful to them, by making people aware that such resources exist. So even though they may be technically illegal, I don't see much prosecution of these sites. Of course, this is just from my memory of what I heard, and may just be my wishful thinking. :-)
There are quite a few sites with O'Reilly content on them, some with advertising for various things, so it would seem their lawyers are letting it slide, or are complicit with it.