"If the userbase is really fixed then Mozilla should try to maximize their revenue by letting Yahoo! and Google bid for the rights."
They do exactly this. Yahoo's bid was comparable in terms of money, and "better" in terms of Mozilla's mission. For example, Yahoo agreed to respect the Do Not Track setting -- something Google will never do. Because tracking is Google's business.
Since Yahoo is the underdog in search, Mozilla has more leverage to get them to modify things ( evidently a 35-page "things you should change" document was also agreed to). Google's bid is always "Here's $_______ , take it or leave it, we keep our own counsel about how the web should work"