Basic botany and critical thinking skills. The difference between fruit bearing plants and animals is that slaughter isn’t an intrinsic part of animal reproduction. If you can present an alternate theory that better explains why angiosperms spend the energy to encase their seeds in stuff that animals find delicious, I’m happy to concede. All the evidence suggests they co-evolved with animals to take advantage of an efficient method of seed dispersal.
If you want to make a teleological argument, then you could equally ask why agricultural animals, compared to wild animals, have much higher fat content and other characteristics that humans find delicious.
All evidence suggests those features are favored by humans, who are the animals currently responsible for ensuring their continued reproduction.
Yes, that’s how agriculture works. You select the ones that are the plumpest and tastiest and breed those. Doesn’t change the origin.
So cows and pigs - like many fruiting plants - co-evolved with the creatures that fed on them. In both cases, those creatures became necessary for their long-term survival.