I can guess. The merchant pays a percentage to the card issuer, usually more than 5%. If you can get away with demanding cash then of course you do.
Holy cow, has the fee climbed that high? We never accepted CC's in our tiny enterprise because the fee seemed too high many years ago, and it was well under 3%.