It is retrieved automatically and stored locally on the second node if that is subscribed to the stream. This command is just a method for retrieving the data from that local storage.
Offchain data is not stored within the blockchain, even if it is small. You can see small pieces but not long pieces of data within the response for various stream querying APIs, because of the maxshowndata runtime parameter. This sets a limit on how much data to show within certain API responses. If you set it to 0 than no offchain data will be shown in stream querying APIs and you will always need to use gettxoutdata or txouttobinarycache.
The name of a file in the binary cache is just a temporary local fact and has no meaning in terms of how that data is tagged on the blockchain.
You cannot change the path of the cache directory explicitly but you can replace it with a symbolic link to a directory elsewhere if you wish. Don't do this while your node is running!