Key bindings only react when I press something. A hook reacts to what tmux itself does, which opens a few small automations I would otherwise do by hand.
set-hook attaches a tmux command to an event. The manual has this example, which applies the even-vertical layout after every split:
set-hook -g after-split-window "select-layout even-vertical"
Put it in ~/.tmux.conf and each new split is followed by that layout. Besides the after hooks, which run after a command completes, the manual lists events such as client-attached, pane-exited and pane-died. The last one fires when a program exits but remain-on-exit keeps the pane open.
Another example from the manual writes a line to a log whenever a tmux command fails:
set-hook -g command-error "run-shell \"echo 'a tmux command failed' >>/tmp/log\""
Show what is set with tmux show-hooks -g. To remove a hook again, use -u:
set-hook -gu after-split-window
The hook command runs every time the event fires, so something heavy in a hook makes tmux feel slow. The layout example also rearranges all panes after each split, which undoes a layout you arranged by hand. And pane-focus-in only fires when the focus-events option is on.
Further reading: tmux manual
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more