The discovery of cat skeletons several thousand years old has given anthropologists some clues as to when human beings first began to domesticate cats.
An archaeological dig in China has found skeletons at what was probably a millet farm operating about 5,300 years ago. Cat skeletons have been found at the dig, with indications that they fed on the mice who fed on the millet, in order to reduce the amount of millet-feeding mice hanging out around the storage bins.
The researchers think that wild cats began hanging around the farm villages because the grain attracted a lot of mice, and they could spend less time hunting and more time napping. The animals and the people probably then developed the relationship as the cats got used to the humans and the humans proved adept at providing food during non-mouse times as well as scratching that place on their foreheads between their ears that they can't quite reach themselves. Other villages would have seen the utility of having furry little sociopaths around who could get into small mice-friendly places inaccessible to humans and picked up a couple of their own to begin the same process.
I imagine cats would quibble with the story's terminology, though. The scientists say that this arrangement was when cats were domesticated. Cats, on the other hand, would say it was when they were hired. And then they would remind us we are probably behind on paying them, so they will go take a nap now.