The Anna Karenina principle relates to the domestication of animals because it explains why so many animals have not been domesticated.
In this book, Diamond argues that it is geographical factors, not cultural or racial factors that determined whether a society would become advanced and powerful. In Chapter 9, he is arguing that domestication of animals (which helped make societies advanced and powerful) happened because of geographic luck, not because some societies were better than others.
This is where the Anna Karenina principle comes in. Diamond says that there are lots of different factors that can make an animal unsuitable for domestication. Because there are so many factors like that, most animals can't be domesticated. This is why, for example, Africans did not domesticate things like zebras.
The connection, then, is that this principle explains why so many animals did not get domesticated. It proves (Diamond says) that it was just luck (not cultural or racial superiority) that allowed people in Eurasia to domesticate so many animals while people in Africa and other places could not.