The leaves and fruit of Piper auritum taste just like root beer. The flavors of this plant are complex and aromatic, with notes of sassafras, anise seed, wintergreen, and pepper (the plant is related to black pepper, after all). Indeed, every bite of its large leaves or stringy, white fruits will bring to mind flavors that would find a place in a mug of root beer. However, it is not typically used in making the carbonated drink, and is only occasionally mixed into home-brews.
In Mexico, the plant is known as hoja santa (“sacred leaf”), due to a legend that the Virgin Mary once hung baby Jesus’ diapers on the plants’ branches to dry and scent them (an unlikely tale, however, as the the plant is native to Central America and southwestern North America). Local chefs work the peppery leaves into a variety of dishes, grinding them and adding to mole verde or mole amarillo, shredding them for use as a seasoning in soups and egg dishes, or simply using them as an aromatic wrapper for tamales and goat cheese.
One of the aspects of this plant that makes it taste like root beer is that it contains safrole. This is a chemical compound that also appears in the essential root beer ingredient sassafras. Studies on safrole have shown that it can be carcinogenic to animals, leading to a ban on its use in commercial foods (a safrole-free sassafras is now used). Safrole is also a key ingredient used in making the club drug Ecstasy, which doesn’t help its legality. Fresh hoja santa contains only small amounts of this chemical, so it is unlikely to cause any harm and won’t heighten your clubbing experience. But, as with all things, it’s best to be used in moderation.