The Mozilla foundation owns the corporation, so it's not 'run by shareholders' in the normal sense. Any profit it makes stays in Mozilla. I think they set it up like this because some things are legally easier to do as a for-profit corporation than as a non-profit.