Simple economics, using a card essentially gets the cardholder a discount. I get about 3.5% on purchases that aren't subject to any special deals or 'categories'. Using cash actually incurs fees, either find your particular bank's ATM, pay a fee, or switch to another bank. Besides that, after paying with cash you're left with heavy, noisy, coins. Sure, on the few occasions I'm forced to pay cash that change goes to the nearest tip jar, but that means I'm paying an even higher penalty for using cash. I'm not going to stand there at the counter counting out pennies to pay for my next purchase, when I could swipe a card and let the next person order.
That's not even including the other benefits, I can pull up my credit card statements and find out how much I paid for something last year, or total up how much I'm spending on food each month. Plus, if my wallet is stolen the cash is gone, but I'm not responsible for charges on my card.
Also, Visa/MC don't get 2-3%, their cut is much smaller than that. Most of the fees go to the issuing bank (i.e. for my Chase card, the money goes to Chase). For rewards cards, the issuing bank is returning almost all of that to me. Sure, earning a tiny amount (measured in hundredths of a percent) on each transaction does make Visa/MC very wealthy, but ATM networks make lots of money, too. So do armored car operators (for moving cash from businesses to banks, or from bigger banks to smaller banks).