Because the rules of the App Store say that the apps that get charged the fee are those who rely on the purchases or payments as their primary function. Browsers have a different primary function.
So why don’t I owe 30% to apple when I receive a payment through a qr code shown by my banking app?
Let’s be honest here, the rules of the app store are arbitrary and designed to extract the maximum amount of revenue from the ecosystem, within the limits of what apple thought people would put it with. Turns out they may have miscalculated.
Because that's not a "digital good" and you're not buying something from your bank. It's the same reason you don't pay Apple 30% to buy something with Best Buy's app or Target's app. The rules are not arbitrary. They're set up so that if an app is using Apple's store and infrastructure, it has to pay Apple for it and it can't circumvent that infrastructure. The alternative is a clusterfuck of payment systems and transactions with Apple as the middleman with no way to ensure any kind of experience for the customer.