There are different ways to categorize food (culinary, botanical/science, traditional, nutrition etc) and sometimes, the same foods may be categorized differently by a different system ie, is tomato and fruit or a vegetable?. Botanically it is a fruit. In nutrition food groups, it is in with the vegetables.
In the way we look at food for nutritional reasons, we categorize foods by their nutritional similarity (mostly by macronutrients). So, a tomato is in with the vegetables because its carb,/fat/protein/calorie density/nutrient density numbers are more similar to the vegetable category then the fruit.
In regard to quinoa, botanically speaking,
"Quinoa is a species of goosefoot (Chenopodium), is a grain-like crop grown primarily for its edible seeds. It is a pseudocereal rather than a true cereal, or grain, as it is not a member of the grass family. As a chenopod, quinoa is closely related to species such as beets, spinach, and tumbleweeds."

However, nutritionally speaking, because of it numbers, it is considered and thought of as a intact whole grain.
In Health
Jeff