It's legally not anti-competitive behavior (as in, both Google and Apple's lawyers believe so) because it's just a 'default search engine' fee - everyone knows that iOS/Safari is the most lucrative platform to be the default search provider for, so a large number like $20 billion is to-be-expected. I'm sure that, in a lawsuit, Apple would argue "if someone else came and paid us $21 billion, we'd take it and drop Google/start a yearly auction" but no other search engine has that budget.
Apple is surely free to make their own search engine, and to an extent, they do - in Safari, the "suggested sites" feature is a search engine but one that only returns {single result | no result} and only works on iOS/Safari. On that same note, you can prove this by tracking search engine user agents for your website to look for Applebot/0.1 hits (if your site is popular enough).