"Taken together, these studies significantly alter our understanding of one of humanity's most familiar companions. Rather than silently trailing behind early farmers, slinking ever closer to human activity and community, cats likely moved into Europe in multiple waves post-domestication from North Africa, propelled by human cultural practices, trade networks, and religious reverence."
Being treated like a god will get you everywhere.
And of course being able to eliminate pest populations responsible for disease transmission, food spoilage, equipment/infrastructure damage, and other various harms has earned cats that seat in the pantheons of cultures around the globe.