The point of incorporating as a charity is that it makes you exempt from taxes. Obviously the government that collects taxes wants to make sure that every corporation doesn't incorporate as a charity solely to avoid taxes, so it places strict limits on what you're allowed to do with charitable donations.
The Mozilla Foundation (as distinct from the Mozilla Corporation) is specifically a 501(c)(3) charity under US law. That means it can use its funds for the following:
"The exempt purposes set forth in section 501(c)(3) are charitable, religious, educational, scientific, literary, testing for public safety, fostering national or international amateur sports competition, and preventing cruelty to children or animals. The term charitable is used in its generally accepted legal sense and includes relief of the poor, the distressed, or the underprivileged; advancement of religion; advancement of education or science; erecting or maintaining public buildings, monuments, or works; lessening the burdens of government; lessening neighborhood tensions; eliminating prejudice and discrimination; defending human and civil rights secured by law; and combating community deterioration and juvenile delinquency."
https://www.irs.gov/charities-non-profits/charitable-organiz...
Notably, developing a free web browser is not one of the charitable activities that the IRS recognizes.