Altavista used keywords and the assumption that websites would be honest, because, what motivation would they have to not be honest. There was no real monitization on the web, and websites with bad reputations, websites that included keywords that were bogus, would simply fall off the web due to free market forces.
However, about a year after Altavista was founded, 2o7 among other c tracking cookies began to monetize visits to web pages. Altavista, though a huge innovation over Yahoo, was still a simplistic model that really had no method to counteract the market forces that made keyword inflation profitable. Also, Altavista had no real way make money.
Google was a hybrid of Altavista and 2o7 and had several advantages. First, because it used links and not keywords, it could actually use free market forces to evaluate the quality of the page. The assumption was that if a page were linked by a lot of other sites, then the page was useful and it could be ranked based on content. The second was that unlike 2o7, google actually provided a service to end users, so end users were in effect compensated for allowing tracking cookies on their computer. I myself had my browser set to reject all tracking cookies except for Google as I needed those cookies for other services. Third, the Google algorithm was quite sophisticated, so could be tweaked as the pure link based ranking failed due to link farms and the like.
Now, honestly, in many cases the search results returned by google are no better than the search results returned by altavista at the turn of the century. What saves google is that it has funds and motivation to improve the results as the SEO people attempt to manipulate the rankings. I think google is looking at the secondary and tertiary levels of the links to determine ranking, which is helping a lot. Ultimately there is going to have to be some serious math done and graph theory developed to get the ranking back to the quality that allowed Google to pummel everyone else.