If the Event/Action requires it. Example: The defined Submit Button control means “submit the new or updated values to the server.” To define what happens on the server after the values are submitted, you must create an afterDialogValidate Server-side Event.
Control-level events and Action JavaScript do not and cannot handle every programming task.
Some client- and server-side Events are custom Events by definition.