To continue my example of soldiers with the runner dogs above, one thing we were taught is that if the enemy is using dogs against you and they're not an immediate threat, take out the handler - Losing a mate will upset the enemy and leave them with no handler (one shot, multiple elements off the battlefield, and even more if he's a live casevac), but shooting a dog will upset them so much they'll go ape on you, bringing as much merry hell down upon you as they can radio in. We often responded the same and it's a lesson that usually got passed on to the enemies who'd previously trained with us.
On a basic level, I'd say it comes down to the same reasons other animals eat one meat but not another.
Put a dog next to another dog, a lamb and a rabbit - Chances are the dogs would team up to corner the rabbit and maybe even share the meal or just fight over it... or they may team up against the sheep and both have their fill. It's highly unlikely one will try and eat the other, though, as they recognise similarities between them - I reckon there is that same human-canine recognition, which led to us adopting them into our tribes in the first place.
Certainly for us, most of our pets are the kinds who came over to make friends and have that certain look in their eyes, whereas the animals we tend to use for food are those that just stand and stare indifferently.
Yes, there are a few videos of people with pet pigs, lambs and so on (not seen ones of cows...), but they are the rarity hence the need for a video of it.