Let's say author gets 40% of each sale and the publisher gets 60%. If a random dude brings a client through 'illegal' affiliate link that pays 2% of the item price. Then yes, he earns 2% without being blessed by the author. But the author earns 20x as much on that sale. While he earns only 2/3 of what publisher does on this sale. So this random dude with his dirty tactics brings the author many times better deal than publisher did.

All numbers made up. I don't have any idea what they might actually be. I'm just presenting my logic with an example, in service of hopefully better understanding.