That means you're paying it when you pay cash too....
Subsidizing card users.
In fact I'm pretty sure Visa and Mastercard forbid charging a different price if customers pay in cash.
In the US, that is no longer true. They can at least have a minimum, not sure if they can charge differently, but for small purchases it is effectively the same
They don't forbid charging a different price, or even advertising a different price; they only forbid advertising a surcharge for using a card. An advertised cash discount is acceptable. States may have further requirements, for example, California requires gas stations report credit prices in at least the same size numbers as cash prices, but enforcement is light.