1. less reliant on your worst competitor
2. get to give your users something everyone else has to pay for (with money or data)
Not all of it, but it's disingenuous to say Apple doesn't make money from ads.
And in this context, that's why it is not a foolish choice to spend money on something that it's hard to sell ads on as long as it helps sell more iPhones.