Mozilla (the foundation) is a non-profit corporation, but Mozilla (the corporation that creates the free browser) is a for-profit corporation. They're separate entities.
Of course, non-profit corporations are still able to turn profits as well. They just can't distribute dividends to shareholders.
To be clear: The for-profit is wholly owned by the non-profit; so there are no shareholders (except for the non-profit).
There are restrictions around what 501(c)(3)s can do. The existence of Firefox helps push the goals of Mozilla Foundation, and also bring extra money to the table of the non-profit (but not unbounded! There are similar restrictions on how much money can travel back that way)
Yes, and to be clear, I don't have any issues with this setup. I just wanted to correct the original statement, because it annoys me when "for-profit vs non-profit" is used to imply things that it doesn't actually imply (lack of a profit motive). Or when people imply that being as non-profit means that the company can't or doesn't actually turn a profit.
Of course, non-profit corporations are still able to turn profits as well. They just can't distribute dividends to shareholders.