Cats naturally carry some parasites. When a cat's health deteriorates, these dormant parasites can multiply rapidly, potentially leading to ear mites. It's also possible that the cat contracted ear mites from owners or other pets brought in from outside. 
Ear mites are a problem that can be solved; the key is the method. If the method is correct and reasonable, the cat's ear mites will heal faster.
Actually, cat ear mites are related to the cat's environment, the people it comes into contact with, and other animals. If the cat stays at home and doesn't go outside, it doesn't mean that mites won't get in.
The reasons for infection may include: the cat itself carries a small number of ear mites; people in the household have been in contact with infected cats or dogs outside; or there are other animals in the household carrying parasites.