Since the history of pets (or at least working companion animals) predates written history, this question is better asked at r/askanthropology
This recent thread discusses why humans domesticated certain animals, and uses bears and cats as an example.