I recently had to update some website code which accessed a certain directory to get flat files. I needed to change to a different directory. That directory location was hard-coded into three different scripts.
It only took me a minute or two to update and save all three files, but as it was a web application, a minute or two could have meant quite a few errors because of the discrepancy between what script A was reading and what script B was reading.
Only a small thing, but I was forcefully reminded that if I wanted to do a cutover like that from one file system to another, it would get done much more cleanly if the directory location could be changed in only one file, so I put it into a shared "require" file ASAP.
Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.
M-J D