Forklore: Root loop
In an old-time Western, the good cowboy never ordered anything at a saloon but "sasparilla." The bad guys would snicker, because it was like bellying up to the bar and demanding a root beer. In fact, sarsaparilla is one of the traditional flavorings of root beer, along with other roots such as pipsissewa, a euphoniously named variety of wintergreen. (True sarsaparilla is a tropical South American vine. The Old West barkeep probably served a drink made from wild sarsaparilla, a North American member of the ginseng family.)
The predominant root beer flavoring always used to be sassafras root--yes, from the same tree whose powdered leaves are gumbo file, the Cajun seasoning. But sassafras root isn't used for root beer anymore, at least in this country, because it contains safrole, a supposed carcinogen.
In stark contrast to sarsaparilla, sassafras once had a far from pure reputation. In the early 19th century, saloop--hot milk flavored with sugar and sassafras root--was a popular street drink in England. It was a cheap alternative to coffee (this was before the English became tea-drinkers) and a reputed cure for venereal disease, which meant that eventually people were embarrassed to be seen drinking it in public. So around 1850, saloop disappeared . . . to be reborn generations later in carbonated, semi-frozen form as our own root beer float.