Being the default search engine on iPhone means you can generate a lot of revenue, and so it is a valuable position to sell. As you say, Google got outbid by Yahoo a couple years ago for Firefox. If Google weren't paying, apple would sell the search bar to somebody else.