In the first case, the advertisement was wasteful: the company that sold you the product has unnecessarily spent money, which goes to the product price. And this is not a small amount: big consumer companies spend billions on advertisement space/time alone, an amount comparable to their R&D expenses. I'm talking about ads alone, not other marketing expenses, many of which are related to advertisement. In most companies, marketing budget dwarves R&D, by the way, and in some markets, this costs could very well be the biggest chunk of the price in a product.
In the second case, you would not buy the product without the ad. That may mean that you simply didn't know the product before and finding it was good for you, but most probably you didn't need it or would not want it if not because of the ad.
In this common case, you didn't win: you just spent money because of a need/want that you didn't have before seeing the ad. You were hacked and exploited for both the publisher and advertiser benefit.