Botanically, tomatoes are a type of fruit; a berry, to be precise.
In 1887, U.S. tariff laws imposed duties on vegetables, but not on fruits. Some smart lawyer (we occasionally stumble upon evidence of these fabled creatures) representing not only a particular commercial interest but Mother Nature Herself argued that the tomato is indeed a (duty-free) fruit.
Alas for Mother Nature and the noble litigator championing her, on May 10, 1893, in Nix v. Hedden (149 U.S. 304), the U.S. Supreme Court ruled (unanimously) that “based use and popular perception,” under customs regulations the tomato is a vegetable. This puts the court at odds with science, but in concord with commerce.
With appropriate deference to global hoards of bellicose taxonomists, the court acknowledged its limitations by not purporting to define tomatoes beyond the rule of American law.