This is large scale Matrix-like exploitation at its finest like only humans can do. Copying the genes of a single animal hundreds of thousands of times, killing the males at birth, plugging the females to a milking machine, feed them corn and soy which is totally not their natural diet and injecting them with tons of antibiotics, hormones and god knows what else. I wonder what could possibly go wrong? All completely…
Necessary/unnecessary, when it comes to food matkets, is a problematic way of thinking. It's ultimately preference, not necessity driven and our food culture is very complex. Completely necessity driven (calories, nutrients and such)... the food market could be much tinier than it is today. We'd be getting our animal proteins from insects, our fresh vegetables from a small collection of locally efficient species, etc…
And it couldn't be any other way, its economics. If one farmer starts feeding the animals with cheaper food and have better milk yielding cows, he would have a competitive advantage over other farmers, and start taking over a larger part of the market.