It is a fruit.
The whole vegetable push was initially for taxes.
(https://www.goodhousekeeping.com/home/gardening/a20705757/ar...)
(https://www.businessinsider.com/supreme-court-tomato-is-vege...)
Also, the average Joe around the world is really really bad in plant related food classification. Given that a lot of cookbooks are written by non-culinary experts, I would take such culinary information with a grain of salt as to proper naming and classification. Culinary experts do refer to strawberries, tomatoes etc accordingly.