

The eSIM uses the TPM / SE chip and the physical SIM uses smartcards running Java applets. The SIM type smart cards generally make use of tamper resistant circuits and are set to not allow key extraction, similar to the TPM.
It’s not undefeatable, but both require really expensive hardware and you can only target devices you physically have in your hand so it’s not worth the investment. If you’re law enforcement you don’t even care about unlocking the SIM, you’re just going to the carrier directly instead. If you’re not using that equipment for stealing hardware wallets from rich cryptocurrency owners, you don’t have a chance of return of investment. Also it will fail a lot (destroy the chip)



With older all symmetric key SIM cards with all symmetric key establishment you could use it to tap into that. On newer devices, the modem chip and the OS handles the connection and the SIM card uses asymmetric algorithms to identify the user’s device to the carrier and you can’t use it to derive call session keys after the fact.
The card can do other things, but it’s rare for it to actually implement anything but simple protocols to tell the phone how to identify the carrier and how to authenticate against it. In some countries you can use the SIM for payments, etc