Credit cards are also not actually that expensive for merchants. I think the average transaction fees for MasterCard and Visa are in the 1.3% to 2.6% range, which is quite far from 30% in my mind.
Obviously, one would cry out how cash has no baked-in transaction fee, but cash is definitely not free. While a credit card payment will transfer cleanly into a bank account with a clear trail, cash must be handled, stored, counted, kept safe, transferred and so on. All that time counting change at the counter isn't free either.
It's far from the 30% because there's nothing else for them to do other than keep that clear trail and it applies to every usage. Companies like Apple that charge 30% charge that because they host the files, the updates, the payment systems, and review systems. Credit card companies don't do those things.
Also they carry an actual risk unlike Apple.