Credit and debit card transactions have higher fees because unlike Pix, there is chargeback risk, and the the merchant and acquiring banks party to the transaction are compensated for the risk they assume in those transactions. Pix on the other hand is digital cash. When you spend it, it's gone. Unlike with chargebacks and disputes, there is no reliable mechanism to recover funds for goods not delivered.
With Visa and Mastercard there are usually many additional actors that also take their share and drive the final fee up.