They can do it, but is it going to make them money? Google's $20b/year payment made up 20% of their income in 2023. 20% of their income was just free money, and their dev team doesn't have to do anything for them to get it.
Would Apple or their shareholders accept a minimum 20% loss in income, plus whatever the expenses would be to build a Search and Ad platform, plus the continued expenses of maintaining and updating it?