Ok, I guess you’re thinking of your shell where you can “add a command” by dropping a shell script anywhere on the disk? Or your text editor, where you can add commands by editing some config file? I guess that’s fair. Note however that each of these programs has bent over backwards to enable easy extensibility. The average program does not. This is more like adding a command to sed or grep, which have no extensibility (aside from editing their source code).
"Adding a command to do X" does not imply (in general) "altering the source".
That is, there are plenty of cases where one does not need to hack the source to effectively "add a command" to the running system.