OG root beer was made with sassafras root. That ingredient was declared illegal when it was discovered that if you feet this stuff to rats by the shovel they get cancer.
If one is so inclined, they can venture out into areas where the plant is growing and harvest their own root. I have seen videos where someone does just that. That kind of adventuring is way off my list of options so I will just have to live without.