You have misunderstood the purpose of advertising. It is not to sell you things you want to buy, it is to sell you things they want to sell. A very fundamental difference.
It's both. Advertisers very much want to advertise things you want to buy, to either trigger a purchase that you were holding off on and might forget about or (more often) to direct a purchase to a specific product or brand, rather than a competitor's. Advertisers also want to push purchase ideas to you, to tell you about things you might want to buy that you didn't know about, or often just to build brand awareness or brand vibes so that if at sometime in the future you're interested in something, you'll pick theirs.
Advertisers really don't want to pay money to show you ads for stuff that you simply won't ever buy. That's a waste. And the ad algorithms often screw it up and deliver wasted ads. That lowers the value to advertisers, making them willing to pay less per ad, which lowers the value to ad distributors. They'd very much like their ads to be better.
Larry Page used to say that the project of building good advertising wasn't done until every ad resulted in a purchase. That would actually be a kind of ad nirvana for advertisers, who would be willing to pay a lot for a guaranteed sale, ad networks, who could charge a lot for an ad, and even consumers, who would never see any ads except for things they wanted to buy (even if they didn't know they wanted the thing until they saw the ad -- indeed those would be the most valuable ads, since they would convert a guaranteed non-purchase to a guaranteed purchase).
(Larry's comment ignored brand awareness advertising, obviously).
The status quo is obviously very far from that situation.