Depending on where you are, this cost might be hidden from you. (banking in the USA for example is expensive compared to the UK)
However as you point out, those companies that provide PoS terminals take either a monthly fee, or a percentage cut.
Neither are roads, railways, wastewater treatment, communication lines or electricity. Money is infrastructure, and it makes sense for government to control and subsidize these to secure free and equal access, as well as ensure that developments of them occur in ways that benefit all members of society.
Politicians can’t print a dollar without abusing it to promote religion (“In God We Trust”), funding war, or handing it out to get reelected.
https://www.federalreserve.gov/monetarypolicy/reservereq.htm
It worked quite well, I'd say.