To be clear, the strict purpose of the FDA is to ensure that for things-where-you-can't-easily-tell-what's-in-them, like food or drugs—but which have ingredient labels (or names that serve as common-sense ingredient labels), the thing must actually contain what it's labelled (or common-sense expected) to contain.
The FDA looks for poisoned cucumbers, because the FDA's job is to define "cucumber" and stop people from selling something as a "cucumber" if it's not one.
That's about poisoning; but it's also about high levels of weird things like potassium, that are fine normally but which people don't think of as being in a cucumber and might interact with the drugs some people take. It's also about products that don't contain the right ingredients (i.e. why Cheez Whiz isn't Cheese Whiz.)
And, for drugs, it's about the name mapping to a registered claim of a particular effect, such that manufacturing pills that don't have that effect means you can't call them by the registered name. (Otherwise you could sell "ibuprofen" with 2 nanograms of ibuprofen per cap. The ingredients list wouldn't be a lie, per se; it would still contain ibuprofen.)