If they want to run their businesses like that, that's fine. No objection. I'm sure they'll find plenty of customers. It might even be me depending on how desperate I am. But it's accepting that it's not going to work for a segment of their potential market.
Another example is cash-only/card-only, the former of which I now find much more obnoxious. That's a decision they're allowed to take, but it removes a segment of customers (it's different to the "Google knowing better" in the original post). I will likely not go back to a place that's cash only, because I don't usually carry cash any more.
Depending on the country you can walk into an office supply store and walk out with a cheap terminal (Square, SumUp, etc) that will allow you to take payments so it's nowhere near the "6 weeks wait and a merchant bank account" that it was when card payments were in their early years. Which means it's just lazy. It's lazy and it's pushing that laziness onto your customers, who have to go to the ATM.
Disclaimer: This varies country to country. In germany it's much more common to have to pay cash, because they have some long term, anti-tracking hang-up that go back to the cold war (at least that's my understanding).
Is this really "knowing better"? I mean, if you want a bigger coffee, and are taking your own cup: just ask them for two, and put it in the same cup.
The card issue has another aspect you're not considering: credit card networks charge fees. There is no inherent fee to accept cash.