How come everyone knows tomato is a fruit, but they all assume pepper, cucumber, courgette, aubergine, &c are vegetables?

Even Dr Sheldon Cooper, PhD, a bloody genius at several natural sciences, once called a cucumber a vegetable in The Big Bang Theory.

Updates
+1 y
What puts a tomato into a different category than other fruity ‘vegetables’?
How come everyone knows tomato is a fruit, but they all assume pepper, cucumber, courgette, aubergine, &c are vegetables?
Post Opinion