What modifies the PATH variable on macOS? echo $PATH returns a different result than the PATH variable I define in .bashrc. .profile is empty.

What else could be modifying the PATHvariable?

The directories listed are all things I would have entered (i.e., not done by software), probably after having read something online, but I don't remember where.

This question is for macOS Mojave, not OS X Mountain Lion. Yes, the answers are the same, but the questions are not.
The system default $PATH variable is set in the file /etc/paths. That file has a one directory per line structure.  

There are also multiple others files that can set or modify the path variable - user specific configuration files, and shell specific ones, that only apply if you use that specific shell.

I suggest not editing the system default file (/etc/paths) as it would affect all users. To add directories to the path used in a Terminal session (and assuming that you use the default bash shell), generate a file named .bash_profile. With a text editor, create a line that adds the directories you want to the default path, e.g:  

PATH=$PATH:$HOME/bin:$HOME/projects  


That will add the directories "bin" and "projects" in your home directory to the system path. You will need to either execute source .bash_profile or restart your terminal session for that change to become effective.