The only way to “absorb the cost” is to pass on the cost. Now you’ve got a couple of options there:
They can just increase their prices, thus charging everybody more
They can decrease quality (ie cheaper supplies), thus giving less for the same money
Or they can figure out which customers cost them more, and just charge them what they’re costing you
The fact of the matter is taking credit cards is expensive. You have to pay to be on the network, and they charge you for every transaction. Margins are thin in the restaurant business, there’s a reason 80% of them go out of business in the first year. The only thing these fees are is showing you the math. They could take option 1, increase prices across the board, and then you’re STILL paying the fee, just not seeing it.
Bottom line, allowing customers to use a credit card is good for business for many reasons, so why would you “punish” them with an extra fee and discourage their use? Makes no sense.