Ruminant animals are far more efficient than us at turning plants into high energy protein and fat.
And omnivores like pigs and chickens can eat things that we can't/won't (food waste, insects, worms, grasses, seeds), and turn them into protein and fat.
Our current animal feed system is terrible (grow large quantities of monocrop corn and soy on high quality arable land using vast quantities of fertilizer and terrible soil conservation practices).
But farm animals are an important part of the 'circuit' of a viable small farm. Chickens and ducks can help with weeding. Goats and sheep can turn sod into manure, one of them best fertilizers. Having meat/lard/soup bones in the freezer is an important way to get through the winter.
Legumes don't produce a complete protein that we can survive on by themselves. Vegetarian diets tend to skew too far in the direction of carbohydrates. Plants that produce fats and proteins in the quantities we needs (nuts, avocados, etc.) are pretty much as water hungry as animals.
A pure vegetarian diet may not in fact turn out to be more energy efficient or environmentally sound if it just replaces our monocrop animal feed farms with monocrops of unhealthy insuling-provoking carbohydrates.
Historically, highly hierarchical or slaveholding agricultural societies fed their slaves almost exclusively maize/rice/wheat -- and kept the meat/fish for elites. If you look at the archaeological record and remains of those bodies, the health effects are obvious. Short stature, dental health issues, bone density problems, shortened lifespans. Roman soldiers were terrified of their taller and stockier Germanic/Celtic foes who lived on a more well-rounded diet with more meat and dairy.