You don't know about non-profit shenanigans? Ok, so, let me tell you...
There are two entities: the Mozilla Foundation--which is what everyone thinks of when they hear "Mozilla" and think Mozilla is a non-profit--and the Mozilla Corporation--which is what actually comprises the bulk of Mozilla's operations.
The Foundation does practically nothing. Your donations to the Foundation don't go towards development of Firefox, they mostly go to pay the salaries of the Foundation employees, who mostly work to... raise money for the Foundation to pay their salaries. This is a problem with a large number of non-profits in general--that most of the money raised is just spent on maintaining the fundraising apparatus. But in particular at Mozilla, it's a drop in the bucket of what Mozilla Corporation needs to keep operating.
The vast majority of the actual software development work is done under the corporation. And the vast majority of funding that the corporation has comes through a search advertising deal that Mozilla struck with Google.