In addition to the issue of microchips being inherently difficult to tamper with, smartcards have various hardware and software based anti-tampering measures, that are designed to destroy the chip, if someone attempts to extract the keys from the chip. That kind of security measures are never totally impermeable, but defeating them requires advanced equipment and skilled labour, and the R&D costs of the cracking devices need to be offset, too.