I dunno, managing to convince the alpha species of the planet not to eat then and instead to provide them shelter and food with no expectation of work in return could be considered pretty smart.
I'm quite sure that said alpha species is providing far more pigs with food and shelter than dogs. The suicidal strategy of being tasty seems to work quite well on the species level.