I’m not 100 % sure how it exactly works, but I think Microsoft recompiles/translates the games and you then download the changed binary instead of playing off your disc (which is also why texture streaming should be a lot faster).
This is most likely a process that’s automated for the most part though. And I highly doubt it’s recompiled from source, that’s why I called it “translated”.