But if banks wanted, they could actually track the serial codes on the bills around. And since often cash is used in only 1 hop (so ATM -> you -> shop -> bank) they could know pretty well where you spent your money.
A quick reference: https://news.ycombinator.com/item?id=9948081
E.g. about China: "According to schedule, by late 2015, the serial number of every Rmb100 note withdrawn from banks by members of the public can be traced."
That doesn't include how much you spend exactly. And it only works most of the time (what if my money gets used as change for another customer?).
Also, been a couple of times in the situation where either the shop's card terminal was malfunctioning, or the bank had some issues, and the card payment was impossible. Without cash you'd be helpless in such a situation, whereas cash = power & independence.