Google does more than just look for certain words on a page and link to it. It uses a system of crosslinking..it finds links to the page used in the same context as as keywords, and it also uses how it's linked to other pages for a rating system. And there's stuff that they keep secret.
i don't think Google was actually responsilbe for the 'weapons of mass destruction' and 'french military victories' jokes, anyone can use googles algorithms to make these things happen. it's just because when you press 'i'm feeling lucky' you get sent to the site with the most hits. so what you do is you create a site that can look like an error page, then post the address on ALOT of forums and send it to alot of people, then eventually when you search for the key words pressing i'm feeling lucky will send you to that page as it has the most hits.