Cash is not free for a store to handle. Stores pay transaction fees on credit cards, sure, but they save on all the costs of cash. A hypothetical store that takes credit cards only would not have any of these costs and their vulnerability to robbery/theft would be limited to merchandise and capital only, saving the cost of insurance against theft of cash. For some types of businesses (services rather than retailers), this makes their office a pretty unattractive target for burglars and eliminates employee theft of cash.