> Installing mods is done by copying compiled .class files into the client .jar
This is no longer true, except for Forge. What you're talking about is the old-style mod system, which has been obsolete for some number of years; nowadays they're dynamically linked from iterating over the mods/ folder.
Mods are created using the decompiled client, and built against that. But when they are released, they do not contain any of Mojang's code.
Installing mods is done by copying compiled .class files into the client .jar