I would bet that usually these are compiled for better performance, and of lawful reasons (make it harder for any user to save code without decompiling), though I'm not sure.
In any case, I believe performance is the major consideration (I'm very new to programming and cannot tell how data processing of robots is different, say, than that of high-end PC games or heavy PC software and if performance considerations will be usually similar or how different).
Are robot's codes usually installed when compiled from source code in an external computer or as pure source codes interpreted by some engine installed on the robots operating system?
(please example on JavaScript and Raspberry pi if possible at the moment).