BMW's dodgy practices were detected by Matt Cutts, a software engineer at Google who explained how the company had violated Google's webmaster quality guidelines, specifically the principle of "Don't deceive your users or present different content to search engines than you display to users."
As he explains in his blog, search engine 'bots' arriving at the BMW site would see a page full of keyword-loaded text, which had been optimised to ensure a high search engine ranking.
But what the search engine saw and what greeted visitors were two quite separate things, as a piece of JavaScript would immediately redirect visitors to a completely different website.