Most buttons that I have perform some common actions. For example, they perform a security check. The owner of the record must equal the logged in user. Or the logged in user must be the manager of the record owner. This prevents users from submitting changes to records they do not own.
I would like to make a custom function called, say, userPermissionCheck that I can call within the custom action function for each button. Instead of including a copy of the code in 10 buttons, I would have 1 function used by 10 buttons. This reduces code management cost and risk of errors introduced by having multiple copies of the code.