And the Apiaceae family is particularly evil in that sense. Ferula is in the same family as the carrot, but also is a distant relative of Hemlock and of the "Joker's plant".
Even some edible carrot-like plants can produce enough photosensitizers in their sap to deliver quite nasty burns. Be careful bushwhacking through things that look like carrots!
Potato in itself is poisonous, no need to go looking for any relatives (and there's plenty more poisonous plants in the nightshade family). Yet we still eat it.
The tuber isn't poisonous unless it suffers prolonged exposure to sunlight (this is why you should not eat green potatoes). The green foliage and tomato-like fruits of the potato plant are poisonous, so should not be eaten.
Solanine poisoning can even be done by gas inhalation.
Potatoes are inherently poisonous, especially if they are sprouting. But in the potato tuber itself, the doage is low enough not to worry... as long as you're older than 3 or 4. Beneath that, and you can subject children to poisoning accidentally.
> Most home processing methods like boiling, cooking, and frying potatoes have been shown to have minimal effects on solanine levels. Boiling potatoes reduces the solanine levels by only 1.2%, making it an ineffective way to decrease the concentration of glycoalkaloids in potatoes.[23] Deep-frying at 150 °C (302 °F) also does not result in any measurable change. Alkaloids like solanine have been shown to start decomposing and degrading at approximately 170 °C (338 °F), and deep-frying potatoes at 210 °C (410 °F) for 10 minutes causes a loss of ∼40% of the solanine.[24] However, microwaving potatoes only reduces the alkaloid content by 15%. Freeze drying and dehydrating potatoes has a very minimal effect on solanine content.[25][26]
> The majority (30-80%) of the solanine in potatoes is found in the outer layer of the potato.[26] Therefore, peeling potatoes before cooking them reduces the glycoalkaloid intake from potato consumption. Fried potato peels have been shown to have 1.4–1.5 mg solanine/g, which is seven times the recommended upper safety limit of 0.2 mg/g.[18] Chewing a small piece of the raw potato peel before cooking can help determine the level of solanine contained in the potato; bitterness indicates high glycoalkaloid content.[18] If the potato has more than 0.2 mg/g of solanine, an immediate burning sensation will develop in the mouth.[18]
Aside from the well-known toxicity of potato stalks, leaves, and flowers, and of the tuber once it has been exposed to enough sunlight, even the edible tuber is usually poisonous enough to noticeably irritate your mouth and throat if you eat a mouthful or two raw. You have to cook it to make it edible.
There's a couple of orders of magnitude of errors in your comment: it's hundreds of millions, for centuries, or tens of millions, for millennia.
But potato has nothing on cassava, which has also been a staple for tens of millions for millennia. Looks like you're a Yank, like half the people on this godforsaken website, so you might only know it as "tapioca". In both cases, being poisonous discourages insects and other wildlife from expropriating your crops, and James C. Scott famously argues that being underground makes it more difficult for a certain kind of human pest to expropriate them as well.
So the humans deliberately eat roots because they are full of cyanide. Truly they are space orcs.