Ok long ago and far away at the founding of our great nation, fruits and vegetables were under different import/export/tariff laws so at some point lists where made of which food belonged in each group for tax purposes really... no one consulted a botanist and food groups for nutrition had not been invented.
Botanically a fruit is the mature ovary of the plant... therefore if it contains a seed it is a fruit. Tomatos, cucumbers, beans, corn, peas... while we think of them as veggies (and they are taxed as veggies) all contain seeds.
Much more recently, there was concern over child nutrition. Some folks noticed that children do not eat enough vegetables. Our great nation vowed to fix this problem! Tax supported school lunches would be healthy! The poor children of the US of A would get their veggie-veggie-fruit group (aside: I really miss "Food Rocks")!!!! But, alas and alack even when healthy veggies (botanically fruit!) were offered children still did not eat them! What a huge waste of food and money... so we did the American thing. We changed the definition of a vegetable (enter ketchup) so now our school lunches do have an adequate number of vegetables. (cue patriotic music)