I think one of the reasons there were not many cats around is because they used to eat them. And once in a while the restaurant feline catches would grab an kitty they could find and take them back to the restaurant. I recall seeing cats in glass displays out leading of the restaurants. But somewhere between then and today they banned eating pet cats. So cats are now not on the menu and now there are pet cats everywhere. Many of them began in someone's house and acquired thrown away, as a general rule are incredibly friendly. Also they have this thing about belly worms. And in those times China had not been as modern as now so stomach worms would have been a problem. Fleas aren't a really problem because they may have tile flooring surfaces and wooden furniture.
Then the nine lives of the humble feline who only wanted to help mankind by eliminating rodents that taken disease took a significant turn for the more serious during the middle ages. Where witch hunts and getting rid of at the stake were the norm. Someone who didn't like cats somehow connected these to witches and they were burnt at the stake with there owners. That they made that connection I'll never know. It started off with Pope Gregory IX in the 1232 who regarded the normal house kitten as diabolical. Then to make concerns worse in1484 along emerged the greatest cat killer ever, Pope Innocent VIII, who decreed something along the lines of all cats came from hell and really should came back to the fires of hell by open fire. Felines were mercilessly prosecuted and were burnt so they would return to the fires of hell. It is amazing any survived because if you were trapped with a cat you were burnt jointly. I still go to cathedral and sometimes I simply wonder why. And of course the Black Loss of life was in the background surviving and thriving because there were no cats to kill the rats that transported the fleas that brought on the disease. Then along emerged the cat's savior King Louis XIII of France, who in the 1630s repealed the law and cats once more started to live. However they were still hated and wiped out for many hundreds of years from then on. I have no idea if the Dark colored Loss of life subsided but felines once again secured mankind from the diseases carried by rodents. Plus the famines brought on by mice plagues.