Asiatic desert cats were encouraged by Egyptian and other advanced races like the Greeks to protect grain stores and other foodstuffs from vermin such as rodents and insects. Apparently 30 percent of a modern cats diet is insects which is good to know if you don't like creepy crawlies.
Vermin were parasitic on the human population whereas the cats lived in unison with the locals and were even allowed to sleep in their homes if the cat was pleasing to them and became a status symbol later on too! Bastet being the cat deity worshipped by the Egyptians.
Even then it was the cats who adopted us and chose to live with us because it suited them!