Onions may look kind of like fruit, but they are not. To be a fruit in the common sense of the word, something has to be a fruit botanically. Onions are not botanical fruits; they are bulbs. They contain no seeds, and they grow underground. They’re technically stems.
In addition, they just don’t seem like fruit. Although they are roundish, they are very not sweet. Aside from some interesting people, most would not eat them like an apple. Fruits are not supposed to burn your eyes. Onions are eaten as part of people’s main meal, not in desserts or fruit salads. You cook onions before eating them more often than not, and if you don’t, you always add them to savory dishes like burgers or vegetable salads. They are pretty clearly vegetables, even ignoring botany.
The Onion is also a satirical news website. It is not a fruit or a vegetable. Not the Onion is a community for real news, but it’s still not a real fruit or vegetable.