There's a fairly common misconception that if the people couldn't have pirated a book (song, film), they would have bought it, as if there's some sort of guarantee that a book will necessarily be purchased simply because it's been published, disregarding that people need to (1) be convinced they want it and (2) consider the price worthwhile.
Sure, a X number of people have downloaded it for free simply because they could, but this doesn't automatically means that they would have bought it in the first place.
It's likelier that some five thousand people in developing countries who couldn't afford a £30 Java study book would find other means to learn Java (other ebooks based on it, Youtube tutorials, Stack Overflow, forums etc.) if that book simply cannot be pirated for whatever reason, than the fact that those people would suddenly start to buy that £30 book.