Nobody really eats tomatoes for the calories though. People (with meat-based or plant-based diets) use tomatoes for flavour and other nutrients.
Still, perhaps they are a bad general example.
Perhaps a better one would be rice (~2g CO2e/kcal). There the problem is the massive methane emissions produced from the cultivation approach.
Point being: There are huge differences between different foods, and they are non-obvious.
The CO2 impact of rice and grains in general can't be compared the impact of animal products, here is a graph - https://i0.wp.com/shrinkthatfootprint.com/wp-content/uploads...