Apple's income doesn't come from adverts, it comes from selling iPhones

Yet Apple Maps and other services play a crucial role in enhancing the value of Apple’s ecosystem

Right, exactly! Improving Apple Maps is a good investment because it makes you:

1. less reliant on your worst competitor

2. get to give your users something everyone else has to pay for (with money or data)

Apple's income does come from advertising: https://searchads.apple.com/

Not all of it, but it's disingenuous to say Apple doesn't make money from ads.

"Not all of it" is doing a lot of work. It's estimated that Apple ad revenue will be ~2-3% of total revenue in 2024.

Sorry, i didn't mean to be disingenuous. i meant, ads are not the main source of its income.

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.