Yes, someone DID scientifically figure out what the needs are. It IS as scientific as that.
They did it by several methods. Some diseases (rickets, kwashiorkor, scurvy) are directly caused by lack of specific nutrients. Replacing those nutrients cures the diseases. This has been known for centuries in some cases – British sailors were called “limeys” because some ship’s doctors discovered that lime juice (high in vitamin C) would help correct scurvy. So do pickles, so they went to those later, but who wants to call a sailor a “pickley?”
In the last century or two, we’ve had scientific method used to identify requirements for vitamins, minerals, proteins, and fats, as well as for caloric requirements. This has been recorded and reported in medical and scientific journals. This is actually important to governments (soldiers need to be fed and kept healthy without unacceptable wastage, and oh yeah, so do other people to keep them happy and productive) and companies that make and sell food want to know that what they are making and selling is marketable as good and nutritious. So both governments and private businesses have spent hundreds of millions of dollars studying and researching this. Universities are commonly funded to do the work. If your state has an agricultural college (it probably does) then part of its funding is used to study this.
When the USDA creates its recommendations, it may give an MDA – minimum daily allowance to keep the “standard” human being from getting a disease from the lack of the nutrient – or an RDA, recommended daily allowance, to keep the “standard” human being healthy.
Note that you are NOT a “standard” human being, most likely. They’ve worked to improve the definitions over time, though. You will still need more of some nutrients, and possibly less of a very few others.