1) The search engines pay money and receive something in return. That's a closed off transaction. It's not like Mozilla needs to keep them happy, so that they come back. Sure, it would be nice, if more than one search engine continues to exist, so that there's competition for that spot, but that's about it.
2) Search engines are not actually that dependent on tracking. The ads can be placed based on the search query, and a browser can't block them from tracking that search query.
3) There's competition between search engines, so even though they share a common interest in being able to track users, it's not like they'll all agree to give up that spot. When one search engine is pissed off enough with Firefox to not want that spot anymore, another one will gladly fill in.
And 4) there's already other politics that prevent Mozilla from blocking all tracking. Webpage owners need to be kept happy, too. If you block tracking, those make less money off of your browser, are less likely to spend money to fix or develop things for your browser and so on. With so many users voting for Chrome, too, there's little incentive for webpage owners to spend anything on supporting Firefox already, so Mozilla can't be too aggressive with taking tracking away from them. And I feel like that's much stronger than the search engines' stake in Firefox.
Not quite the same thing, but there's (almost) always a weird interplay and tension whenever something actually needs to get funded or make money.
I will admit that there is issue regarding non-free client-side JS but a lot of projects tend to ignore that.