There are a number of angles to approach this from, which fuzz the sharp ethical line.
Domesticated livestock account for 60 percent of mammal biomass (humans 36%, 4% wild). That scale sees them closely linked to current landscapes and ecologies. Vegan advocates have to address this, as a practical matter. Some landscapes can only produce limited human food crops, but can be grazed, like Tibet or Afghanistan, with implications for their food choices. And the fate of current domesticated animals and of their subspecies’, when they can no longer survive healthily without humans. Rewilding is a popular solution, and research suggests vegan diets need far less farmed space, a reduction by as much as 75% has been estimated, and are much less damaging to the climate eg methane production and water pollution.
Suffering of animals in well regulated farming systems can be minimised, it may often be less than their wild ancestors faced. Slaughter is more-or-less always painful, although most developed countries have a lot of regulation around this. There can still be strong arguments made around opportunity to be free, for self-determination, and for an animal's and species right to express themselves. To say that all pain is intrinsically bad and must be stopped though, implies needing to interfere between carnivores and prey. And that will cause surges in prey species numbers until mass starvation and ecosystem collapse. If we accept predator animals, can't humans also hunt?
We differ from other predator animals, in being able to make a vegan diet healthy (in the developed world), or at least an ovo-vegetarian diet as has been widely practiced in India for 1000s of years with coexistence with cows rather than slaughtering 'excess' bulls as the industrial dairy system does.
The science shows pigs are among the most intelligent non-humans, although they don’t pass the mirror self-perception test, there is dispute about why. Humain treatment and conditions can be mandated, but is always undermined by cost considerations, and frequently by the impact of the work on people who raise and kill animals industrially. Pigs even the best industrial farming conditions (in the UK for instance all must be allowed to range outdoors), suffer from the absence of woodland which they evolved for, and natural social structures, and from boredom.
We have the freedom to decide whether or not to hunt, or use our buying power to commission others to raise and kill animals, and we are accountable for our motives and how we balance harms and benefits. Peter Singer makes probably the strongest arguments for the ethical desirability of becoming vegan in The Expanding Circle. We used to have various ways to define other humans as lesser- or non-human. He makes the analogy with why moving away from genocide and slavery based on racial essentialism is morally and practically better, which I think is one of the stronger arguments. Taking into account the science which shows us the capacity of animals to suffer, if we don't essentialise being human as giving greater moral value, we have to expand the circle of who deserves moral concern beyond simply humans to animals based on their capacities. And wanting to keep a sense that there is something sacred about not using humans as food or exploiting people without regard for there interests and wellbeing, we must have a way of applying that to at least some animals, in some degree.
There have been moves to give chimps a charter of rights. Widespread outcry over killing dolphins. Some people only expand the circle that far. But Singer's argument generalises, that the more we expand the circle the better, the more developed we become ethically and morally.
Adding in the climate impacts of meat eating, it does seem like a closed case to me - it is the single biggest way through lifestyle change available to reduce our impacts as individuals.
These are not points from a convinced vegan, I am not one, but to be morally and ethically consistent with the best values and thinking, I think I should be.