In 1887, U.S. tariff laws imposed duties on vegetables, but not on fruits. Some smart lawyer (we occasionally stumble upon these fabled creatures) representing not only a particular commercial interest but Mother Nature Herself argued that the tomato is a (duty-free) fruit.
Botanically, tomatoes are a type of fruit; a berry, to be precise. Alas for Mother Nature and the enlightened 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, putting the court at odds with science, but in concord with commerce.
With appropriate deference to hoards of potentially bellicose biologists across the globe, the court–by way of covering its ass–acknowledged its limitations by not purporting to define tomatoes beyond the rule of American law.