The merchant is not paying for the rewards.
There is no merchant in the world who has negotiated a credit card by credit card contract where they pay less for accepting a non rewards credit card.
The merchant is paying a contracted transaction fee/percentage of each transaction. It does not matter if the card is one with rewards or without, the cost of accepting the card is the same.
Merchants also pass on costs of business to the consumer.
Apparently some like to highlight specific business costs, calling them out on the menu which alienates some customers, while others treat credit card fees the same as any other business costs like labor and build it into the cost of their product.