It's not so simple as all that.
We raise chickens, turkeys, ducks and geese completely free range. Our homestead doesn't really even have fence on all sides and most of it is virgin forest. All these sepecies can survive on their own in the forest here, although not in the same population density that they have on our homestead. We feed them, we take care of them when they are sick, and we provide some protection from predators... we also have dogs, and the dogs presence alone helps quite a bit with that. We also take some of their eggs, and sometimes we kill some of them. The birds know all of this, yet they stay, because life is better here than in the forest. Actually, some of the ducks (Moscovy ducks, they are fully native here) do leave, but they do so mostly when there are too many males and they end up fighting a lot.
The bottom line to me is this... we keep the birds for eggs and fertilizer (and because we like them), we really eat very little meat, but we have to manage the population. When we let it get too big they suffer more, there's more disease, more fighting, etc. In fact, sometimes when the population has gotten rather dense, there has been murder and infanticide among them! They can't solve the population problem non-violently on their own, but they do like the benefits of food and safety, so we have to solve the population problem for them. I'm not rationalizing, I love these animals and don't like killing them, and I have gone long stretches of time without eating any meat and don't mind that. But I kill them, because when the time comes it's the right thing to do, and after I kill some I eat them because that's also the right thing to do, not because I want to eat meat.
So you might say: well then don't keep animals! Maybe, but keeping them is the most ecological way to maintain the soil fertility around our homestead (poor tropical soils) and the food we can produce because of this reduces our overall ecological footprint. I think it's a win-win for us, the animals, and the planet.