Another way to say "a dog is for keeping you company" is "These days, if you want a friend, buy a dog."