I can't speak to the HN consensus, but on some comment areas/lists I've moderated in the past, we generally tried to allow ones that were there in good faith. It's a fine line, though. It's ok with me if someone was going to recommend a book anyway, and throws in their affiliate link rather than giving the exact same link without an affiliate code. But does this subtly induce people to include more Amazon links than they might have otherwise? To recommend books that are only
sort of apropos, or even kind of a stretch? To link Amazon when the author's site about the book, a Wikipedia article on it, or a relevant Google Books excerpt would otherwise have been the obvious links? In book-related discussions, does it induce people to recommend books they think will be popular or eye-catching (or at least get clicks), as opposed to ones they genuinely think are good?
I think the answer is probably yes to all of those, but with the right people/context/community it probably isn't bad enough to be fatal. And I agree that if someone does recommend me a book that I do end up buying, it seems fair to give them 4% or 6% or whatever, especially since if they didn't get it, that amount would just go to Amazon.
I guess in summary: previous experience leads me to believe "maybe, it depends".