Ah, apparently it's there for historic reasons: `sh` and later `bash` set $? to 127 when the command is not in `$PATH`.

More on it:
http://stackoverflow.com/questions/1763156/127-return-code-from
http://tldp.org/LDP/abs/html/exitcodes.html