There's a subtle difference: pharmacists are regulated by statute and are legally liable if medication they dispense on prescription causes injury. (Source: I used to be a pharmacist -- in the UK, > 25 years ago, precise regulations vary by jurisdiction.)
Ad networks are utterly unregulated. In terms of this pharmacy metaphor they're snake-oil salesmen.