The Home2 Suites by Hilton at the Kansas City airport adds 3% to customer bills for 'credit card processing' though apparently when pushed they'll remove the fee. (HT: The Gate) This is a common practice in Australia, where merchants have been allowed to do this for 10 years, though the government found businesses were passing on more than their actual cost here.
The truth is that it's cheaper to accept credit cards than other payment methods, and it's an underhanded tactic no different than a resort fee to impose a hidden add-on on customers. Why should a customer have to cover a business's cost to accept their money, on top of the cost of the product they're buying?
This hotel publishes this charge (emphasis mine):
HOME2 SUITES KCI AIRPORT HOME2 SUITES KCI AIRPORT
SUITE:FLEXIBLE RATE;1 KING BED STUDIO SUITE NONSMOKING;FREE BRKFST/INTERNET-KITCHEN W/MICRO/FRIDGE
6/17/20 - 6/18/20 108.12 USD
TOTAL ROOM PRICE: 108.12 USD
TOTAL ROOM PRICE (incl. tax): 130.54 USDTAX BREAKDOWN
8.60% SALES TAX
7.50% CONVENTION AND TOURISM TAX
0.25% ARENA FEE
$2.00 SERVICE FEE
$2.00 UTILITY FEENOTE: CREDIT CARD CHARGES ARE SUBJECT TO AN EXTRA CHARGE OF 3%

Credit: Home2 Suites Kansas City Airport
It's a non-optional fee in many cases, too, as hotels increasingly will not accept cash. And where you can't avoid the charge it should be included in the room rate. (Where a hotel won't accept credit cards, or charges you less - effectively a discount - for other payment methods, those should be flagged clearly enough in advance to give customers time to make arrangements to go to an ATM or remember to bring a check.)
Checks have to be taken to the bank for deposit, and checks can bounce. Then you have staff costs to collect on bad checks. You can insure against bounced checks, but then you're paying a percentage of check volume there too.
Cash doesn't just have to be taken to the bank, and carrying and holding cash has insurance implications for many businesses, but cash can get lost and can also 'get lost'. It tempts employees into unethical behavior that can spill over to other elements of their job. It takes time to reconcile cash, which you nee to do between shifts. And you need to store cash, too. And keep cash on hand for making change. You may also be given counterfeit cash which winds up being worthless. And cash is a target for stick ups, too, putting employees and customers at risk.
On the other hand credit card processing is electronic, it's easy to reconcile, and the funds are put straight into your account. Compared to the carrying costs, risks, and staff time managing other payment methods, credit card merchant fees actually represent a good deal.
Furthermore, when you accept cash or checks only you're limited to how much money a customer has available at the moment (if you're lucky!). Credit cards offer consumers a lending feature, and even when customers pay off their bill at the end of the month they aren't limited to what's in their account at the moment, they can pre-spend funds that are going to become available. Customers often spend more on credit cards than they would with cash. So the cost of accepting credit cards has revenue upside for businesses, too.
There's two things going on here. First, the cost of merchant fees is easily seen - rather than being dispersed among various costs and risks for other payments, because credit cards are so simple it's a single expense line - and the cost of merchant fees is large. Since merchant fees are being charged in one, easily identifiable place, they're easier to attack. There's one (or a small number) of entities to bargain against.
Merchant fees represent a big, easily identifiable expense. They're part of doing business, and a more efficient way of doing business, but since they're easy to understand it's easy to pass on the cost or seek regulation against. But going after consumers with a surcharge for accepting credit cards is no different than imposing resort fees or venue fees or COVID-19 fees on top of the advertised price of what you're buying. It's an unfair and deceptive practice.