Reasons:
- UNIX standard
- If the last line in a file doesn't end with a newline then addition of next line affects two lines instead of one. This also pollutes diff on multiple files, so reader may wonder what has changed in a line whereas no significant change has occured.
Multiple newlines at the file end are also redundant as well as spaces at the end of line.