Until a few years ago merchants were not allowed to charge credit card fees. In that case, online fees make a legally-allowable proxy for credit card surcharges.
the whole allowed to/not allowed to charge extra to cover the processing fees is a yo-yo. One of the best known examples is gas stations showing you different prices for credit/cash on their signs. So the "until a few years ago" seems like some internet trope as I can remember the gas station signs showing cash/credit from back when I was a kid, and let's just all agree that wasn't "a few years ago"
It might also be that you’re just hearing from people in different states. More than half of the states allow surcharges, but that can change: for example, Oklahoma removed the ban just last year:
https://legiscan.com/OK/text/SB677/id/3231564