A cat's personality and behavior are influenced by a variety of factors, including genetics, environment, socialization, and health. Therefore, some cats enjoy being petted, while others dislike human contact and may try to avoid it.
Here are some factors that may explain why cats behave differently in human interactions:
1. Genetics: A cat's personality may be influenced by genetic factors. Some breeds of cats may be naturally more affectionate and friendly, and more willing to interact with people, while other breeds may be more timid or less affectionate towards people. 
2. Socialization: A cat's socialization experiences during its kittenhood have a significant impact on its personality and behavior. Kittens, exposed to a variety of people, animals, and environments during their early years, are able to establish positive interpersonal relationships and interact with people more easily. Cats lacking socialization experience may be wary of or avoid strangers.
3. Environment: A cat's environment and living conditions also influence its personality and behavior. Cats raised in a safe and comfortable home environment, with good interaction and positive emotional experiences with their owners, are more likely to have a positive attitude towards interpersonal interactions. However, in adverse environmental conditions, such as past neglect or insufficient social interaction, cats may develop negative emotions towards people and become wary of them.
4. Health condition: A cat's health condition can also affect its personality and behavior. Pain, discomfort, or other health problems may make a cat uncomfortable with human touch, resulting in it showing reluctance to be touched or avoiding human touch.
It's important to note that cats are creatures of nature, and each cat has its own unique personality and behavioral habits. Some cats may be naturally more proactive in human interaction, while others may prefer to remain passive. Respecting a cat's personality and preferences, and giving it sufficient autonomy and space, are crucial factors in building a good relationship with your cat. When interacting with a cat, observe its body language and behavior, and respect its intentions.