It really does not make sense to have a cap only for out-of-network, when in-network arguably are less cost for the institutions. But of course banks are spending a lot of money on both parties so...
At some level, it does. When these laws were passed, I think the main goal was to stop companies from charging exorbitant fees to other companies' cardholders when using their ATMs to withdraw money and similar. You wouldn't want to do that to your own customers, because you'd lose them as customers, so why would the government regulate it?
But now, years later, in the context of retail sales, card companies want the opportunity to charge higher fees to retailers so that they can give rewards, confident that the retailers will charge customers the average fee rather than passing on the exact fee that they get charged on a per-customer basis, and as a result, that jacking up the prices for your own cards won't cause you to lose customers.
The truly perverse (incentive) part is that customers are forced to chase the higher fees or else they're paying more as the stores up their prices to the newer, higher average.
The only sane way to solve it is for cash-back rewards to be banned outright, with the only allowed exception being retailer-issued cards that grant cash back exclusively at their store by using their own low-fee network (e.g. airline cards, Amazon cards, Apple cards). Because those retailers have every incentive to keep prices low, this very narrow case doesn't have that problem. But even those shouldn't be allowed to give cash back everywhere.