The consumption of dog meat can be traced as far back as 9,000 years ago.
While dogs are intelligent and loving creatures the same argument can be made for many animals. Elephants, polar bears, cheetahs, and penguins are all animals that are fairly intelligent from all different corners of the animal kingdom. Each one raises their young for a long period of time until they're able to be independent on their own. Dogs are quite similar in this manner and have been known to adopt kittens or help humans in raising their own children.
Dogs have the capability of being loving but they are still animals and like wolves, one of their closest genetic relatives, they have sharp teeth and claws and those can hurt. They have a history of being hunters, trackers, and attackers, which is why they are so often used in the police department to find criminals.
While dogs are domesticated and have been for thousands of years this does not change the fact that people still use dogs for what they were originally domesticated for, hunting and food.