Mastercard and Visa take very little out of the transaction compared to the interchange fee that goes to the issuing bank. I believe the issuing bank would take $2.50 on a $100 dollar transaction vs $0.10 for Visa and Mastercard roughly.
Interchange fees to the issuing banks start around 1.5% while Visa's volume assessment is only 0.13%.
But they get a tiny slice on an ungodly amount of transactions, so it adds up.