Duncan Riley is hardly the first person to get hit by inappropriate ad placement. Thanks to contextual advertising, Google AdSense advertisements and others use an automated system to find the perfect text or image to place on your website based on what you've written about.
Unfortunately, AdSense uses a script that fails to recognize the nuances of human communication that would let it know when an ad is in poor taste or completely contrary to the article you've written.
There are a few good examples, including the one above, on this list of 15 unfortunately placed ads.
[via Google Blogoscoped]