Some handlers are given to you by AppleScript. Some handlers will be defined by you. A subroutine is typically used for a routine needed throughout your script. Rather than typing it in place each time it is required, you can create a script, give it a name. The parentheses are for parameters.
Parameters are values passed to subroutines in the form of variables.
The examples didn't have any parameters defined. AppleScripts can be saved as droplets which allow users to drag and drop files or folders on a script application. You may have noticed the parentheses used when calling a subroutine. Well, not only can subroutines pass values back to the main script via parameters, but values can be passed to subroutines. Below the variables y and p are passed to the subroutine.