Usually it's to prevent issue when minifying this script along with others that don't have a semicolon at the end of the file, sometimes causing weird issues like interpreting this file as calling a function from the last file. The comment above might prevent this, but it's a good habit to have anyway.