The secret sauce was instantly pairing "commercial intent" (or the intention to do some commercial action, buy, sell, hire, Etc.) with vendors and firms who can satisfy that intent or "aspects" of that intent. (You might get an Uber ad on a query for "restaurants near me" for example)
Amazon has that in spades. If you are on the Amazon site, that is a huge signal that you are intending to make a commercial transaction. Either with Amazon, or perhaps you are reading reviews of things you can get locally, but the probability that you are about to do something commercial is much much higher. (So does Facebook along a different vector but that is a different post for a different time.)
I know from experience at Blekko that one way to piss off Amazon is to out advertise them :-). That just told me that they considered Ads strategic and selling stuff was secondary to that goal[1].
[1] I reasoned it this way, if selling stuff was primary then any additional exposure is "good" even if you have to pay affiliate fees for it. If advertising was the money maker, then someone doing it better than you (converting your ad revenue into their affiliate revenue) then you respond harshly to that.