The question must have been asked by an American. This is because it assumes that domestic cats are mainly kept indoors. They are not except in America. I am surprised to learn that statistics provided by the American Pet Product Association’s National Pet Owners Survey tells us that in 2014 about 70 percent of domestic cats were defined as indoor only. I thought the percentage was nearer half. Twenty-five percent were indoor/outdoor cats and the remainder outdoors only.
In the UK about 10 percent are kept inside. They are probably mainly purebred cats bought from breeders. Or the cats live in dangerous places like near busy roads. In most of the world cats are free to roam as they please. We don’t have the numbers but at a guess in places like South America I’d expect about 5 percent of cats to be indoors only. The remainder might be indoors/outdoors with a sizeable percentage being outdoors full-time.
The main reason why USA domestic cats are mainly indoors is to keep them safe. A secondary consideration is to protect wildlife from predation by domestic cats. There is a lot of pressure from segments of society campaigning to confine cats to the home permanently. A third is cats being poisoned or killed by abusive people such as Haider Abed in the picture above (he abused but did not kill cats but he could have). But I’d have thought that America is not a lot more dangerous for indoor/outdoor cats than most other countries. So this is a culture issue. A reason why even in relatively dangerous places due to road traffic for domestic cats in the UK, they are still free to roam.
America does have some wildlife which preys on domestic cats such as the coyote. There are also birds of prey (eagles or owls), pumas, raccoons and feral cats all of which can from time to time kill domestic cats. There is quite a bit of danger there for them. I am surprised that more cat owning households don’t have catios or cat enclosures in the backyard. They often have the space and it would be a nice improvement to being confined to the home.
In the UK there is little thought given to confining cats to the home. It is not on the radar normally. Most cats are random bred and of little monetary value. But I agree that when a person buys an expensive pedigree cat costing over £1,000 they are more likely to be concerned about the cat being killed by thugs or stolen. There are no predators to kill domestic cats in the UK except the odd large, hungry fox killing a vulnerable cat because of their age or illness/injury. There are, though idiot people who kill domestic cats for amusement. Roads and maniacs are the UK’s biggest dangers to indoor/outdoor cats.
I believe that most Northern European countries are similar to the UK. Eastern and Southern European countries will have more outdoor cats. You see lots of domesticated community cats in the Mediterranean. They live outside. In Greece they cull (poison) a lot of outside semi-feral cats in the off-season. It is quite brutal and inhumane. Once again it is a culture issue.
Conclusion: why are domestic cats kept indoors? Answer: for their protection and the protection of the emotions of their owners who’d be distraught at the loss of their cat by a person or predator. There is another point. Rabies is a factor in the US as it is in other countries (not the UK where it is eradicated). An outdoor cat could rarely get rabies from wildlife such as a fox or bat. They could transmit the disease to their owners. Rabies vaccines are obligatory as a consequence.