For functions return terminates the execution, therefore nothing will be executed after return.
In your case the first function will print all the items because there is nothing that breaks the process. However in the second function it will return and end the process.