Paypal collects its fee for handling the online transaction because of the privacy/security they offer for the transaction. Mastercard collects it fee because of the straight forward processing service they offer between you and the bank/lender.
Paypal between you and the seller, Mastercard between you and the bank/lender.