Dogs are a kind of wolf. They were the first animals that people fed on purpose, earlier than sheep or cows or chickens. People have been taking care of dogs since at least 24,000 BC, in the Stone Age, long before the beginning of farming (and possibly much earlier; maybe as long as 100,000 years ago, before people left Africa). Most likely, dogs themselves began this relationship by hanging around people’s campsites (there weren’t any villages yet), trying to snatch some of their garbage to eat.
At first, most people must have tried to scare the dogs away, but some people let them hang around. The dogs ate rats, and also helped to clean up food garbage that drew flies and other insects. So campsites with dogs were cleaner and healthier than campsites without dogs. Fewer people got dysentery and died.
The people who lived in these cleaner campsites grew up stronger than people who shooed away dogs, and there were more of them. Eventually, the dog-lovers pretty much took over, all over the world. And dogs evolved to be able to digest more and more people-garbage, especially grains.
Somewhere around this time, people started to think, “What else might dogs be good for?”. Dogs could bark and let you know if any human enemies were coming. Dogs could let you know if the baby was getting into trouble. So people started to encourage the dogs to hang around. At some point, people also started teaching dogs to obey them, and they also started to use the dogs to help them hunt other animals, and to pull sleds. Dogs were the earliest domesticated animals, and may have given people the idea of domesticating sheep and goats, which came next. Nobody’s sure whether this domestication of dogs happened only once, in one place, or many times, all over Europe and Asia, but all known dogs today, all over the world, are descended from those Central Asian dogs of about 13,000 BC. Even Native American dogs came to the Americas from Asia. Today’s European dogs probably came to Europe with the Indo-Europeans from Central Asia, replacing earlier European dogs, just as Central Asian cats replaced earlier cats in China.
Dogs kept right on being useful to people, and living with people, even when people started to farm and to live in villages. It turned out that dogs could also guard sheep, and help to herd the sheep when you were moving them from one pasture to another. Some people ate dogs, especially in China. You might think of those dogs as a great way to turn garbage into food. Even in places where people usually didn’t eat dogs, like Europe, dogs provided an emergency source of food when there was a famine. If you were starving, you had to kill and eat the village’s dogs before they decided to eat you (and then there would be a lot more rats than usual, without the dogs to eat them, and you would live on the rats for a while).
Today you probably think of your dog as a pet, and give it food. But in antiquity and in the Middle Ages, hardly anyone was rich enough to give food to a dog on purpose. Most dogs had to find their own food in people’s garbage, or they had to eat rats. People only fed working dogs that herded sheep or pulled sleds, or guard dogs. So most dogs, like most people, were skinny and had lots of diseases and worms. Even today, around the world, about three out of four dogs are not pets, but live on their own in human villages and towns and find their own food.