The Frodo/Sam dynamic comes from Tolkien’s experiences in WW1. A fair example of this dynamic would be the Blackadder/Baldrick dynamic in Blackadder Goes Forth.
Apparently it was a thing where higher class soldiers had a bloke supporting him. Not sure if it was solely based on rank or social status