No, they're not in it for money. In the end (the foundation owns the corporation), Mozilla is a non-profit.
They need money to achieve their mission though: maintaining a browser (in a landscape of evolving security challenges, performance & web standards) and research (e.g. projects like Rust, Servo & pdf.js originated that way) is not cheap. And currently it mostly comes from search engine deals. If they cannot get a similar one, it all collapses.
I can see why they try to diversify their income. That said, I don't agree with the way they do it here.