Fraud protection of credit cards is the root of modern e-commerce. In some ways, Visa and Mastercard are the privatized court systems of the internet.
If I end up on a random, self-hosted ecommerce site and decide to make a purchase - what guarantee do I have that the item will show up or be as-described? If I bought something through a bank transfer, reversing that purchase would be incredibly difficult. And, suing a merchant is prohibitively slow, expensive, and arduous.
Also, modern B2C SaaS is built on credit card subscriptions. The ability for a merchant to pull payments on a recurring basis from a credit card requires an incredible amount of trust. If consumers had to push payment every month or year to continue subscriptions (instead of having it automatically debited), then churn rates would skyrocket and modern SaaS multiples would crash - taking company valuations with it.
So, I'm sure online merchants are happy to keep paying their ~3% fees as long as sales continue. Nobody wants to go back to "Cash on Delivery", and nobody wants to hire workers to knock on doors asking for bills to be paid.