You're free not to buy books through their affiliate links.
You're only free to do this if you know that it's an issue. Unless you know about the affiliate program, you may be supporting this person against your own will. Even if you do know about the affiliate program, you may not know that after you click an affiliate link, the owner of the code gets a chunk of ANY Amazon purchase you make in the next 24 hours, whether or not it is related to the original link.