Often the answer to a question contains a reference to a book. This might as well point at Amazon.com in such a way as Stack Exchange earns the commission.
And what if someone wants to have their own affiliate tag in the link so that THEY can potentially make a little money?
I am not a fan of either, and I have seen numerous times where people who add affiliate information get flagged as spam. I don't like the idea of StackOverflow covertly changing my links to insert their own affiliate information. That is pretty shady.