Because "< hello.m" pipes the contents of the file to the Matlab console. because it appears there, you find it in the diary also like if you have typed the code manually in the command window.
Use the -r switch instead to execute code:
matlab -r hello.m