In the TNG episode Where No One has Gone Before and DS9's Apocalypse Rising, the animals called targs are said to be kept as pets but in the Enterprise episode Sleeping Dogs it is implied they were butchered for meat- which of these conflicting premises should be assumed?
Per The Star Trek Book;
The targ is a vicious animal that Klingon children keep as pets. Targ look like Terran boars, but have a row of spikes on their backs, a single horn on their heads and can be furry. Targ milk is an ingredient in some Klingon drinks, and their blood can be used to make the Klingon dish gagh.
And the Star Trek Encyclopedia
Targ: Klingon animal. Traditional Klingon weddings include a ritual targ sacrifice followed by the wedding feast. ("A Time to Stand" [DS9]). Tallow made from targ shoulders is used to make proper var'Hama candles. ("You are Cordially invited" [DS9]). Observance of the Klingon Day of Honor included the eating of the heart of a sanctified targ. ("Day of Honor" [VGR]).
So it's both. They're kept as pets and periodically eaten, presumably once they get too big and delicious-looking.
What role do targs play? "A warrior's best friend"
I wouldn't put too much stock in the Enterprise reference.
In Star Trek III, Commander Kruge has a pet targ next to him on the bridge, clearly serving as a loyal companion.
In DS9's Strange Bedfellows, General Markok tells this heartfelt story of how he lost his beloved targ due to his new wife, Sirella.
MARTOK: I remember the day my beloved Sirella moved into my home. I had a pet targ. Had him since I was a boy. A filthy, mangy beast, but in his bony breast beat the heart of a warrior. Of course, Sirella loathed him. Well, to make a long story short, while she was supervising the unloading of her bags, Sirella accidently left the front door open, and my faithful targ, ever ready to follow the call of the wild, tottered outside on his frail legs and disappeared into the forest. I never laid eyes on him again. Source