Just look at the front page of the app store, literal ad right there amongst numerous locations.
Their ad revenue has been expanding since 2016, and despite them hiding exact ad revenue in their quarterly, Tim Cook has mentioned in the investor call that "advertising and analytics, apple services revenue set an all-time record of 20.8 billion in q4".
The strange part would be your weird definition of what constitutes selling user data.
According to your definition, Google isn't selling data to third parties since they now own the entire vertical integration when they bought double click back in 2008.
For me, the biggest selling point of iOS is it’s lock in - be it in browsers or the store.
My phone is the centre of my privacy, and I want it to be as solid and as safe as possible.
So far nobody developed a mobile system that is more open and just as safe and robust.