Great question — answering as the UphillTech team:
When you try to execute a file, the system has to know how to find the file. That's why it works if you specify the full path to it. The shell also has a PATH environment variable that stores a list of directories to look in to find an executable. That's why you don't have to specify the full path for ls .
Full answer by Eric Renouf: https://unix.stackexchange.com/a/203636 (CC BY-SA 4.0).
Need it done for your business? UphillTech.