"I have two cats, a dog, two rabbits, a turtle and a goldfish". Said my Texan colleague.
To say that I was amused might be an understatement. I was flabbergasted. My mind was boggled.
Americans, or at the least Texans, sure love their pets; and so often love to have a LOT of them. That is unheard of in India. While you might occasionally find someone with a pet in our densely populated cities, there is no such general pet culture. Partly because we already have a lot of mouths to feed. But it also has a cultural aspect to it.
Street dogs and cows roam Indian roads. When it comes to dogs, some people love and sometimes feed them, some hate them, and to the rest, it's just an ordinary part of life.
Warning: the next para contains something uncomfortable.
"What!? How can someone hate dogs?", says an imaginary American in my head. Well, dogs may keep people up all night by fighting each other loudly and menacingly for territory, and they like to chase vehicles, sometimes in threatening numbers. More seriously, they can bite, and they kill thousands of little kids each year. And also eat them. Yes, untrained hungry dogs on streets can be a problem. (Edit: I agree with a comment response that this is not a dog problem, but a societal problem)
Now cows are considered sacred by many Hindus. This more of a cultural thing rather than religious. That is, the less-religious or non-religious folks also tend to appreciate them. I cannot promise to give you an absolutely correct reason as to why this is the case, but I am going to take a shot at it:
Unlike the US, dairy farming in India is a small-house affair. My neighbors next door in my Indian village have 3 cows. My relatives a mile away have 2 cows, and their neighbor has one cow. The milk is usually sold raw, and mostly to locals who boil it before consumption.
So there is much familiarity and one-on-one interaction between people and cows. Especially in rural India. This bears resemblance to the amount of familiarity and interaction that Americans generally have with dogs. Now, cows and dogs have a very similar level of intelligence, both mental and emotional. Thus, over time, people learn to treat them with affection.
Besides that, there is also a factor of "appreciate the provider" in any religion. To Christians/Muslims, there is only one "provider". But in the context of Hinduism, the source of every resource is the image of its provider. That is why you might some day see a Hindu "apologize" to a book or kiss it after accidentally stepping on it: because the book is, to them, the image of the God of knowledge. (Stepping on or kicking something is considered a disrespect to it).
By extrapolation of that same context, cows provide milk, and thus bear resemblance to a mother that breast feeds a child. Thus, the cow is the image of a mother. A mother "provides life" and thus is an image of God. That perhaps made cow, by extension, the image of God.
Additionally, cow dung and urine has utility in farms, and they are skinned for lather after their natural death. It is easy to see them becoming the image of prosperity (or such) in a world dominated by agriculture. Over time, these cultural and religious aspects evolved into turning the cows themselves into representatives of God.
In conclusion, the personal human-animal connect seems to be the biggest factor in determining how an animal is treated in a given country. Apart from that, traditions and religious factors play some role too.