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)
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:
https://youtu.be/WMII5G98AdM?t=608 (skipped to the part where he mentions that it's Java)