Mozilla Corporation is a for-profit entity wholly owned by the Mozilla Foundation. That's why they can keep lots of cash on hand and reinvest it into the business.