If cats are supposed to be solitary animals, why are they so affectionate to people?

Cats are believed to regard the humans who house them and provide for them as parent substitutes, and to adopt the behavior toward them that they would towards their parents.

Contrary to the standard myth, it is not the case that males are never nurturers – cat social behaviors are not such as to bring a tom in contact with kittens as a general rule, so they do not customarily nurture. But if a tom and a quean are raised together, and she has a litter, he will regard that litter as partially his responsibility, and provide “babysitting” service for her when she must leave the nest, and sometimes teach the weaned kittens how to hunt. When we had cats, this was almost textbook behavior for the toms of the household.