Vending machines are all about placement & location, and the ability of a vendor to find high traffic locations to put machines.
Machines get placed based on info about locations whether it's demographics, or a kind of business or whatever.
Individual transactions may not have identity tied to them, but it's not like the business is devoid of information about users, or hypotheses about them.
And on the internet... how do you get that info from your users aside from usage analytics (even if it's gross analytics)?
The Internet can be the same. Lots of people buy X. Let's offer more if that. Y is a high traffic location (L as in URL). Etc.
(But you can obtain receipts for cash transactions, which enable to legal recourse.)
And I agree with your point, and I've been using cash more often in my daily life for exactly this reason (anonymity and lack of data collection by credit card co's).
A vending machine is autonomous. It neither tracks nor engages the customer. It takes your money, and dispenses product. Since cash is untraceable, it keeps no record of what was bought and by whom. I feel at peace knowing I will give a vending machine a dollar, and I will receive a Coke, without fearing that I will start seeing targeted ads on my browser or in my inbox showing me more Coke products.
The problem, of course, is that the amount of money lost to a vending machine is negligible. And so if the soda machine eats my dollar, I will probably swear for a bit, but I'm not going to do much to seek recourse. That model would be difficult to extend to, say, Amazon, where I might buy an $800 laptop and need Amazon to have a record that I bought it in case they ship me a lemon.
Nonetheless, I still feel that the Vending Machine Model is something we should aspire to in the e-commerce age, even if we haven't reached it yet.