On a car journey several years ago at two in the morning, author and psychologist Hal Herzog turned to his fellow passenger, Amnesty International campaigner Tony Dunbar, to discuss the cockfight the pair had just witnessed in a small North Carolina township. Herzog was surprised by Dunbar's response to the carnage. "There are bigger moral problems," the charity worker said.

You might expect a representative of Amnesty International to have expressed concern. After all, cockfighting is illegal across most of the United States. However, this cruel pursuit, in which gamecocks tear each other limb from limb, is, Herzog argues, a small problem compared to other types of animal cruelty.

While there are still isolated incidents of cockfighting in Britain and America, in the US 9 billion animals, including cattle, sheep and bison, are slaughtered for food every year. In Europe, that figure stands at 300 million. Many of these animals are kept in inhumane conditions. In Britain, for example, campaigners Compassion in World Farming continually raise the issue of dairy cows' poorly ventilated living conditions, and the long distances they are transported before they are slaughtered. But meat consumption in Britain is now 50 per cent higher than it was 40 years ago.

As human beings, we find it easy to divorce ourselves from this bloodbath. And that's bizarre, given that we treat animals well in other areas. Britons keep 16 million pet dogs and cats. There are 5 million pet snakes and lizards here. As a society, we cage and consume some animals, but treat others like valued members of our families. What is the psychological basis of this hypocrisy?

Herzog, one of America's foremost psychologists specialising in human-animal relationships, is dedicated to understanding our often contradictory behaviour towards different species. In his new book Some We Love, Some We Hate, Some We Eat, he tackles the history of keeping animals in our homes ,and attempts to explain why we like and loathe certain creatures.

"My passion for the subject comes from all sorts of places," explains the author. "I once found myself living in a place where my neighbours were cockfighters. The thing was, they seemed like nice people; they just happened to bet on roosters on a Saturday night. I realised my justification for eating meat wasn't any different. It got me thinking."

Herzog is an anthrozoologist. It's nowadays a burgeoning field of science, what he calls "the study of human-animal interactions". Courses in human-animal interactions are taught in more than 150 US colleges and universities. Britain's University of Southampton has its own Anthrozoology Institute, and the specialism is also to be found at Cambridge's Veterinary Centre. The University of Wales at Lampeter offers an MA. Anthrozoology analyses why we like certain animals. The answer might just be that some of them look like us. The late Harvard biologist Stephen Jay Gould thought Walt Disney drew Mickey Mouse with big eyes to make him resemble a human child. "We are, in short, fooled by an evolved response to our own babies and we transfer our reaction to the same set of features in other animals," he said. You could say it's a form of Freudian "projection". We are subconsciously imposing a set of rules of behaviour on our pets, because of their resemblance to our human family. The closer the match, the more familiar the animals seem.

This also explains why we loathe certain animals. In a 2001 Gallup poll, Americans were asked about the things that "made them sweat". Four of their top 10 fears were animals, with snakes topping the list (their other common animal fears were of spiders, mice and dogs).

University of California anthropologist Lynne Isbell believes that the primate brain was shaped by evolution to specialise in visually detecting snakes. But our response varies widely according to our culture. According to biologist Jared Diamond, New Guineans are not afraid of snakes, despite the fact that a third of snake species on the island are highly venomous. They are adept at telling the poisonous snake species from the non-poisonous ones, which they eat.

The strength of our bond with an animal depends on the presence in our lives of human "competition" for our affection. People without children tend to be more attached to animals. However, those with children are more likely to have animals in the first place (presumably as playmates for their offspring). In this case, love for the animal is diluted – which is probably just as well.

Then there are those little things called morals. "Humans, unlike other animals, have 'theory of mind'," explains Herzog. "This is the ability to project onto other humans and animals and try to imagine what they are thinking. For a hunter, it might allow them to predict what a deer might do next. It might also mean that they empathise with them. In that lies the moral ambiguity." Recently, he says, urbanisation in the West, has meant we see animals in their natural environment less when we are growing up. As such, it's easier for us to detach ourselves from the killing process.

What is especially bizarre with the case of Mary Bale – who was investigated by the RSPCA for throwing a cat in the bin (and subsequently turned into a YouTube villain) – is that women are generally kinder to animals than their aggressive male counterparts.

According to Herzog, both sexes' behaviour towards animals is more or less the same, except when people's behaviour becomes especially loving or particularly violent. Since Victorian times, 85 per cent of animal rights activists have been women. And if you look at those who are intentionally cruel to animals (children pulling legs off spiders, that kind of thing) nine times out of 10 they are male. "There's a mixture of nature and nurture," explains Herzog. "Women are more empathetic, because of biology. Oxytocin, a hormone involved in female reproduction, is thought to be involved with attachment to animals. Testosterone is thought to send men in the other direction."

The health benefits of pet ownership have in recent years found some scientific endorsement: children raised in homes with animals are less likely to suffer asthma; elderly people who live with pets have lower levels of depression. "I think there is some evidence to suggest that pets help with our lives, but it is not as profound as the pet industry wants you to believe," comments Herzog. "There is some literature showing that [pet ownership] is good for people. There is a body of work, not quite as large but which gets a lot less attention, which dictates that there is no difference between pet owners and non-owners on health." The author thinks certain cultures just happen to keep pets. "Some cultures don't even have a word for pet," he explains. "And many people never consider them to be part of the family; they'd just tie them up outside as a way of keeping away burglars."

Despite all this, animals are still badly treated. Around 855 million chickens are slaughtered for meat annually in the UK, and about 95 per cent of these birds are kept indoors, packed densely into vast sheds in what academics and campaigners say are clearly harmful conditions. This situation is echoed in the US, where meat consumption per capita is going through the roof. In China, with its rapidly rising living standards, meat consumption had by 2000 increased to 50 kg per person per year, from about 20 kg in 1985, and continues to grow. Is there any defining statement to explain why, as a species, we love animals but treat them so badly?

"The only consistent thing about it is its inconsistency," concludes the author. "It's to do with rival operating systems in our brains. The arguments over many moral judgements, which take place in the subconscious, are much like whether or not we like a painting. You instinctively decide whether you like it. These things can't be explained by logic. If you took the logical view on how to treat animals you'd let termites rule your house – and that clearly isn't what's happening."