Search Engines such as Google are often at the mercy of the web developer when it comes to ranking sites. Usually, they choose to index content based on what is presented to the search engine when they first enter the site. In some cases, "tricky" SEO's will create one page purely for the purpose of getting that page ranked for a particular term, and then immediately redirect any human traffic to the page that they really wish them to go to.
A recent thread at Cre8asite Forums shows an example of a website that is using this tactic. The indexed website is hosted at Blogger.com, which is respected by the Google spiders and doesn't come with any "baggage," usually. The indexed page has a redirect to a gambling site. The thread spawns an interesting discussion about Spammers and their ability to thwart Google, and leads to some very interesting observations and comments about Obfuscated JavaScript and Google's ability to automatically detect things of this nature.
Join the thread at Cre8asite Forums.