For example, if one wanted to display a "Hello, world!" message whenever several different attributes were changed, the conventional approach would be to embed the call to alert() in each of the event handlers. Obviously, for such a simple example, this isn't such a big deal, but for more sophisticated logic it becomes unwieldy very, very rapidly.
One common approach is to use externally-referenced script files. Great, but imagine the horror when you suddenly discover that your system administrator has been religiously backing up your CRM server for the last six years, but hasn't backed up the web server from which you were serving your scripts... We still have the problem of how to reference them, too.
Then, in your event handler for other controls on the page, you can re-use that global variable:
... and Bob's your father's creepy brother, you have code reuse with no external dependencies.