Same here. I was like "what, there's a JVM in there?". But then again, apparently there's a JVM in most (all?) SIM cards (https://en.wikipedia.org/wiki/Java_Card)
Before Java card, all smartcards were programmed in assembly, Each brand incompatible with others. And even if smartcards were introduced as security devices, their "security" was actually a joke.
Then there was an effort to create a secure interoperable platform for smartcards, it was Global Platform and it uses Java card for implementing their goals. All post 2000 smartcards are compatible with GP: