Selling the search box brings in on the order of hundreds of millions a year. This alone puts them in a singularly unique category of 'well funded' open source software. Granted, their 3-year billion dollar deal may have been the high water mark (edit: it wasn't, revenues have increased since then), but a lot of valuable work can be funded with even $100 or $50 million a year. Sure, they need to constantly be on the lookout for alternate revenue streams should their primary dry up but a lot of the things they've been trying have been contrary to their users interests and marginal at best. (i.e. if they become the thing that many of their users flocked to Firefox to get away from, what is the point of its existence?)
The problem was/is, they take the money their primary product brings in and invest it into some arguably bad, or at least irrelevant, ideas rather than just reinvesting most of it into Firefox and services consistent with what Firefox represents to users. Part of the reason Firefox lost so much market share was that for several years it had been seriously neglected (presumably so that Mozilla could focus on those arguably bad ideas) while the competition continued to improve. (hint: the #1 metric is performance) They seem more interested in playing the role of a nonprofit quasi-startup and social issues advocate than maintainer of the most viable and valuable open source browser.