(i have used magic lantern on a 5DII, but not looked deeply into how it is implemented).
Magic lantern runs along side the original software. The original interface is still there, but hooks are added in, so that additional information can be shown in screen, and buttons can trigger additional features.
I am not sure i they achieve this by creating a firmware that contains bits of the original software plus extra functions. Or whether magic lantern is more like an extra application running on the system.