The App Store Search and iCloud Ads are relatively recent thing. The focus on tracking and invasion of privacy is also a refined version of it. Their whole PR campaign from 2017 to 2020 against ads. ( And it was more targeting Facebook Ads without saying it. Which Apple plan to destroy ) Somewhere between 2019 - 2022 They literally have to come out and said to say they are
not against ads but only against tracking because the whole Ad industry was furious so they have calm things down.
Here is another angle. If Apple could successfully destroy the In App Ads industry, which they earn nothing from, and force those value into subscription, who will benefit most? Remember Apple tried iAds and earn a percentage of it but failed.
People should at least read PG's Submarine [1] to understand how modern PR and media works. Once you have that understanding the lens of reading anything about Apple becomes a little different.
[1] https://www.paulgraham.com/submarine.html