Yep, they have already went through one IRS audit because too much of their income was concentrated on too few sources (makes it look like a front set up by those sources for tax purposes). See https://en.wikipedia.org/wiki/Mozilla_Corporation#IRS_audit for example.
(Disclaimer: not a MoCo/MoFo employee)
Donations are important for the Mozilla Foundation to keep a non-profit status. The Yahoo! deal is a Mozilla Corporation deal, so that's a different story (Mo Corp pay taxes like any company).