There's a big misunderstanding out in the world about what exactly "Mozilla" is. The Mozilla Foundation is a non-profit. They are an advocacy group for open internet standards, essentially. They do not do any of the software development on Mozilla projects. That would be the Mozilla Corporation, which is wholly owned by the Foundation. The Corporation is decidedly not a non-profit.
If the only restrictions on nonprofits are what profits are returned to the owners, if The company is wholly owned by a non-profit what can it do that it couldn't if it wasn't itself a non-profit?
IANAL, and I'm hazy on the details, but I think this lets the for-profit one hold on to more money (but also be taxed more?). There still aren't any shareholders (unless you count the Foundation as one).
Basically, there are limits to what a non profit can do and still be a non profit (keeping a larger cash reserve is one of them iirc) Legally keeping the revenue generating business seperate (and having that revenue feed back to the nonprofit) as a for-profit, taxed organization, is useful.
It seems to be a common pattern. Googling "501(c)(3) for profit subsidiary" gives a bunch of links explaining the reasons why many choose to do this.
That's literally why the Corporation exists. It's a sham to be able to do whatever they want and still maintain the perception that Mozilla is a non-profit.