Birthworts are perennials that tend to grow as herbs, shrubs, or climbing vines. They have funky looking flowers whose shape resembles the human birth canal. Most interestingly, these plants have been used for the past 2,500 years in herbal medicines despite their high toxicity and carcinogenic effects. Of course these impacts were unknowable when Theophrastus, a student of Aristotle, first documented birthwort's medicinal uses around 300 BC (Grollman & Marcus, 2016). Still, the irony can be appreciated, and maybe there should have been an ancient Greek version of the FDA hanging around to test and approve the latest herbal remedies. If there was a GHA (Greek Herb Administration), and they somehow happened to have modern molecular technology thousands of years ahead of its time, they would have found the phytochemical responsible for birthwort's toxicity, aristolochic acid (AA). To read more about the history of AA and the tragic events that led to its discovery, check out this article.
So why, you ask, would pipevine swallowtails prefer to munch on toxic leaves? For protection! Through evolution, the caterpillars have adapted to accumulate AA in their tissue and even retain high amounts in their adult butterfly stage. This protects them from natural predators. This crucial function of AA in the survival of pipevine swallowtails is the reason they have highly specialized diets, and butterflies will only lay their eggs on the aforementioned birthwort species. This is all to say that many organisms, especially insects, depend on specific native plants to maintain their populations. This extremely informative and cool website I came across, West Cook Wild Ones, offers a great guide to butterfly gardening. The page I linked pairs over a dozen butterfly species with their native plants and also offers plant care suggestions.