Why are pets such good companions for people?
I guess, it depends which type of pet and depends upon the person. While some people may like the companionship of a lizard or gecko, those type of pets would not be such good companions for me. I am just not that crazy about owning them as a pet. I'm also not crazy about parrots because they can make a lot of noise; however, some people love their companionship.
Furthermore, some people love having a cat as a companion; whereas others do not like cats and the same goes for dogs (some love dogs and others do not).
There has been research which has concluded that having a pet that you enjoy actually lowers your blood pressure and improves your health. Even placing fish tanks in nursing homes helps calm both residents and staff.
Pets help people by giving them a living being to care about, to be with, and to talk to. A pet can give an elderly owner a reason for getting up in the morning. Even animals that are not exactly pets, but, service dogs and guide dogs, for example, help their person to be more social and to make friends. I like my dogs because they always want to play whatever game I have in mind (i.e. agility, retrieving, hiking, etc). Also, dogs give a person a reason to get out and walk - they are great companions for an exercise program.
Hope this helps answer your question.