In some cases, I think that's more due to the choice of the human, rather than the animal. Pot bellied pigs and oxen come to mind. Not many people today train and work with oxen, but the relationship is about the same as horses to humans. On another forum I'm on, a fellow's ox died suddenly in an accident, and it was as big a deal for him and the people who knew him or the ox, as if a favorite pet had died, despite the fact they all ate beef. And then there are cultures where dogs are considered food animals too, so it can work the other way.
I already answered this, but I decided later that I should give a more complete answer, as I do have some experience in the matter.
When I was around 12, our family started raising Holstein steers for meat. Holsteins are basically milk cows, but the males (and some females, when they aren't needed to sustain or increase the size of the herd) are butchered for meat. They are separated from the parent within a few days after birth and given a synthetic milk formula. The milk from the mother is used by humans, of course.
Anyway, we feed these animals by hand and teach them to drink out of a bucket. While doing so, I actually did try to build some kind of a relationship with the creatures, specifically ones which I found to be "prettier" than others. I was not particularly familiar with cattle before this time... I had been around pigs and chickens a bit, but neither required the kind of attention that those young calves did.
The simple fact is, you can have feelings toward the animals, but I could find no indication whatsoever that such feelings are ever reciprocated in any way. Cattle don't like to be petted like a dog or a cat. They will tolerate you touching them, but do not crave it. The only attention they seem to desire is being fed. Nothing that I observed suggested that they had any other use for me outside of the food (milk, and grain later) that I provided them.
Also, observing them in the field when they were older (they are generally confined to a small pen to themselves until weaned) I got no impression whatsoever that they built any special relationships among their own kind. They seem to have only two categorizations for other creatures: fellow bovine, and not fellow bovine. A new cow presented to the herd was never treated any different than another that had been there all along. Humans for some reason were to be feared... unless they happened to be in the process of providing grain or hay, in which case they can be ignored while going after the food. This, even though we have been feeding them since birth... quite intimately at first.
While feeding the young calves one day, I heard a cat making noises from underneath a pallet. I made its noises back at it, and it eventually came out. I had never seen the cat before, although I had heard my mother mention that a stray cat had shown up that seemed somewhat feral. Anyway, even though no one else could even get close to this cat without having it run off, it eventually walked right up to me, and I petted it, etc. In the course of a few minutes, I built a relationship with that cat that cannot be formed with livestock.
This is what I mean when I say that livestock and pets are quite different.