Bubastis was the center for worship of Bast, the cat-headed Egyptian goddess of fertility.  Initially, her worship included the cats that inhabited her Temples, but eventually extended to all cats.  Cat worship was pragmatic for the Egyptians, for the cats protected their grain stores and homes from vermin and venomous creatures.  Killing a cat was considered murder; a Roman living in Alexandria discovered this when he accidentally killed a cat and was subsequently pulled from his home into the street and lynched by an angry mob of Egyptians.