Mozilla Corporation — who basically just do Firefox — is a separate entity from the Mozilla Foundation. Mozilla Corporation gets commercial investment to pay Firefox developers, so that the Mozilla Foundation doesn't need to pay or invest in it for it to do its thing.
This fire-wall (heh) ensures that Mozilla Foundation can never be said to be being influenced by corporate interests. All the corporate money stays inside Mozilla Corporation, i.e. inside Firefox.