Why couldn’t they pay for the book to get that knowledge then?
Or do you believe, all books should be free, authors shouldn’t be compensated ever? Why should we compensate programmers or any knowledge worker than if the fruits of their labor should thusly be freely distributed?