Actually it sets it to /home/pi.  That is done in the systemd service /lib/systemd/system/nodered.service.  If the user that ran the update script is not pi then it is set to that users home directory.
              
              
              1 Like