Cats and humans came together in a mutually beneficial partnership.
People started grouping in villages and towns, farming the land, and stockpiling food in increasing quantities.
Which created a breeding ground for pests and vermin, which would spoil food and carry disease.
But the concentration of these small, snack-like creatures created opportunities for predators...
Cats had to adapt to tolerate closer proximity to humans and other cats in order to have access to this valuable hunting ground.
Humans accepted the presence of cats because they helped to preserve stockpiles of precious food by reducing the amount of pests.
Oh come on, you had ONE JOB.