Also, the diets of the livestock change the nutritional composition of their meat.
For beef, grass-fed cattle means notably higher levels of beta-carotene, vitamin E, and omega-3 fatty acids in the meat—a more detailed explanation here—when compared to cattle fed the “conventional” feed of different grains and soy and apparently reject Skittles… I find it weird that that we consider a grain-and-soy based diet “conventional” when grasses are the only things a cow is supposed to eat… But, feeding cattle grasses and hays is more expensive, so there’s that.
Sneki beat me too it—pigs are omnivores, so they would likely need more than grass. Quick check online, and sites say that in the wild pigs forage for leaves, roots, fruits, bugs, etc. I would be surprised if that diet didn’t improve the nutritional value of pork—those foods are all more nutrient-dense and have higher concentrations of omega-3 fatty acids than the grain-and-soy diet, similar to the diet for cattle.
Research also suggests that eggs from pasture-raised hens is also healthier. See here. The hens get to forage for plants like clover, and—although I didn’t see it mentioned in that article (admittedly, I skimmed it, trying to beat 10 minute edit window), hens on pasture will eat insects and grubs out of the earth, further boosting things like omega-3 in the egg. But again, the product will be more expensive.