The UK actually forbids cash discounts and cred surcharges by law - and has done so since at least 2012.
Credit card companies are allowed to run cashback for using them.
All in the name of "consumer rights": https://www.gov.uk/government/publications/payment-surcharge...
Mainly because cash processing fees are higher than electronic, and the primary use of cash is to avoid paying tax
Some European countries forbid a price difference but they also limit card fees very low, so the merchant doesn't lose money and you don't get cash back. Forbidding a price difference but allowing high fees is nothing but pure corruption.