It costs the ad creator money every click and rewards google for mixing ads into the search results in a confusing way. This is a sketchy practice when the ad is for the exact product or site you typed into the search bar - as another commentator mentioned, the dynamic forces you to buy the ad to keep competitors from stealing the spot. Toxic