Readability, separation of concerns, extensibility, easier merging of pull requests, improved testability, modularity, and less mixing of html and Javascript in a single file.
Obviously, it would be nice to follow this up with refactoring, but you could also spend this time on another project, of which the author has many (and likely thanks to this "fire and forget" attitude).