Corporations (and the wealthy in general) don't do charity. The tacit objetive of every corporation is and will always be profits über alles. Every time you see a corporation donating money to some cause there's an ulterior motive that ultimately grows their bottom line. The most common motives are: pay less taxes (or none at all), PR move to improve their public image, and, finally, publicity (sometimes because of controversy).
Now, of course, Google's financial relationship with Mozilla is no exception. The stated reason is that they give money to Mozilla in exchange for having Google as the default search engine, but its actual purpose is to mitigate claims about Google having a monopoly on the browser market and thereby avoid anti-trust laws.
If Firefox were to gain the majority of the marketshare Google would no longer have an incentive to give them money. Mozilla wouldn't be happy about that because they'd lose their biggest source of income. And Google wouldn't be happy either because they make money through web ads and harvesting data to sell it to ad companies, and there's no better way to go about doing that than creating their own web browser and a whole ecosystem surrounding it, and then making sure it's the most popular one.
Now, of course, Google's financial relationship with Mozilla is no exception. The stated reason is that they give money to Mozilla in exchange for having Google as the default search engine, but its actual purpose is to mitigate claims about Google having a monopoly on the browser market and thereby avoid anti-trust laws.
If Firefox were to gain the majority of the marketshare Google would no longer have an incentive to give them money. Mozilla wouldn't be happy about that because they'd lose their biggest source of income. And Google wouldn't be happy either because they make money through web ads and harvesting data to sell it to ad companies, and there's no better way to go about doing that than creating their own web browser and a whole ecosystem surrounding it, and then making sure it's the most popular one.