The way
All the infinite variety of felines came from a small number of "first cats". Traditionally, it was believed that the cat was first domesticated in Ancient Egypt about 3,600 thousand years ago, however, recent archaeological research shows that "domestication" took place much earlier and in more than one place. All in the same review, The Taming of the Cat, a study of DNA belonging to nearly 1,000 wild and domesticated cats from around the Old World, concluded that the "domestication" of cats occurred in several different places, with each "domestication" possibly leading to the emergence of certain breeds (this can explain such a large difference between, for example, Persians and Orientals, or between Angora cats and Devon Rex).
About 130 thousand years ago, the subspecies Felis silvestris lybica in the deserts of North Africa. This subspecies still hunts in saxaul thickets and has absolutely no plans to die out. It is believed that about 5-9 thousand years ago, several steppe "primitive cats" of the subspecies Felis silvestris lybica (the so-called "mitochondrial Eves") were domesticated in the Middle East, each in its own place and in its own time. Despite our long history together, we basically know nothing about cats. We can't even tell for sure if they are domesticated. Look at dogs and compare them to wolves: they are not the same animals at all.
A lonely dog will not survive alone - she needs a pack, moreover, a pack of dogs.
The cat is essentially a much more independent animal. Separated from a person, a cat quickly runs wild, and after a while begins to revel in its freedom, not missing the former home life at all. Secondarily feral cats often live solitary and hunt alone, although sometimes they form small colonies of several females with kittens.
Unlike other domesticated creatures, the domestic cat contributes little to human survival. The dog protects us and helps to hunt, the cow, like the rest of the cattle, gives milk and meat - these animals really influenced the life of our ancestors. Previously, it was assumed that the cat protected us from mice, but packs of cats have never lived near granaries, and one single animal can only scare away especially cowardly rodents. If there was any benefit from them, it was not comparable to the benefit that cats received from us.
Some scientists are completely against the idea of domesticating a cat. We didn't domesticate the cat, they say, it was the cat that domesticated us. She came to us, firstly, because next to us there were always synanthropic species - mice, tasty fat mice that you don’t need to hunt in the thickets, and secondly, because these cats were great at manipulating people - do pitiful voice and rounder eyes, purr on your knees and these stupid hairless monkeys will do whatever you want.

Habitat map of ancient cat species.

African wildcat (Felis silvestris lybica).
By Daniele Colombo.