the microcontroller can handle REAL-TIME events, and can use interrupts.
the Pi, linux, or xojo simply can’t. (and all of them together is worse)
it’s ok for many things, but if your timing is tight, then they simply can’t handle it.
I made a small clock, with an esp8266, and using an event loop you can see the seconds are not at the good timing, by eye ! if you use interrupts, it’s dead on.