Dogs and cats have become the most influential and successful pets through long-term domestication. People keep them for various reasons, such as their functional roles or for physical or psychological support. However, why humans are so attached to dogs and cats remains unclear. A comprehensive understanding of the current state of human preferences for dogs and cats and the potential influential factors behind it is required. Here, we investigate this question using two independent online datasets and anonymous questionnaires. We find that current human preferences for dogs and cats are relatively higher than for most other interests, such as games and music. Genetic variations, gender, age, and economic development levels notably influence these preferences for dogs and cats. Specifically, dog and cat ownership is significantly heritable (h2 = 0.43, 95%CI: 0.35 -0.51) and further analysis found that women, young people, and those with higher incomes are more likely to keep dogs and cats, and the primary reason is to gain emotional support. Our study provides insights into why humans get so attached to dogs and cats and establishes a foundation for developing co-evolutionary models.