Plants don't "want" anything. Fruits and plants are not "problematic". One of the few actually poisonous plants we regularly eat is the potato which is an underground tuber.
Almost all the plants we eat reguarly now are the result of artificial selection through agriculture. Toxins tend to taste bad as so most plants have been selected to contain less and less of them. We now probably eat a great deal less plant anti-nutrients than our ancestors did. These anti-nutrients have been eaten by our ancestors throughout evolutionary history. Maybe avoiding them entirely would be like avoiding all bacteria? We do have very effective livers than can detoxify a wide range of compounds.
Evolution is complex and not usually obvious. Producing toxins cost energy. A plant producing lots of defensive compounds will be out-grown by a plant not producing any. Many plants only take defensive action when damaged.
Chemical communication is not confined to the animal kingdom since plants do some pretty strange things too. Watson describes how the acacia tree responds to browsing, or being beaten with a stick, by increasing the levels of tannin in its leaves within minutes. Remarkably, the tannin levels then rise in neighbouring trees, and, due to its bitter taste, repel the browsers before they can do any further damage. This example of plant communication is not restricted to acacia trees, and has been demonstrated in other plants as well as between plants and animals. Tearing the leaves of seedling poplar trees results in a widespread increase in phenols, which are known to inhibit the growth of butterfly larvae. Tobacco plants warn each other of tobacco mosaic virus attack by releasing methyl salicylate, which is then converted to the protective salicylic acid in uninfected plants.
Mammals are also rarely the biggest threat to plants. Insects, viruses and fungi are often bigger threats to survival and plant toxins often target insects rather than people. It is much easier to taste bad than be poisonous.