The story
Possibly from early-20th-century depictions in books and films of the 19th-century practice of a person armed with a rifle or shotgun riding next to a stagecoach driver to provide protection from bandits, etc.
Etymology from Wiktionary, CC BY-SA 4.0.