set is showing you all environmental variables and builtin functions that exist on your machine and in your shell among other information gathered.
If you want to know the full story, check the source code for the builtin.
To address your example,
update_terminal_cwd is in the default systemwide .bashrc file:
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
# Tell the terminal about the working directory at each prompt.
if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then
# Identify the directory using a "file:" scheme URL,
# including the host name to disambiguate local vs.
# remote connections. Percent-escape spaces.
local SEARCH=' '
printf '\e]7;%s\a' "$PWD_URL"