Fruit are a part of the plant used for reproduction. That’s why fruits like apples and oranges have seeds. The part of the carrot humans eat is not seed bearing, therefore does not have reproductive purposes, and is therefore a vegetable, not a fruit.