After much speculation over whether Mozilla, the non-profit foundation, and Google, the search and advertising company, would renew their default search provision deal, Mozilla has announced that a new multi-year deal has been made. The deal will see Google continue to be the default search provider in the Firefox browser for "at least three additional years".

Good question.
They give money to the Parrot VM project, which doesn't seem to have any direct benefits to them. Maybe they fund other open source projects withe their excess?? But there certainly is a possibility that money could be spent on things besides open source development, but hopefully they give a full accounting somewhere.