They were treated not much different than a dog that eats grass, and had no idea they were food. The worst they knew is sometimes a new calf would appear, sometimes an old cow would be loaded up and drove away. All of them named, although they were mostly on-the-nose, our biggest cow was 2400 pounds and we called him Big Mac.
All that said, that is nothing what factory farming is like which is what most people are eating their food from. But there are ways to raise food animals "humanely", we did it for thousands of years up until the industrial revolution because it was the only way we knew how or could manage them. Without solid walls, hefty steel bars, and a cocktail of drugs and antibiotics when disease inevitably infects those overcrowded facilities, it is pretty difficult to keep most animals contained if they aren't happy, domesticated or not.
And yet those people claim they have the concept of suffering (not physical pain).
Don’t you see inconsistency here?