Cats rub against people and objects primarily to mark their territory. They have scent glands located in their cheeks and along their body, which they use to deposit their scent on things and individuals, essentially claiming ownership. This behavior strengthens the bond between cats and their owners. Additionally, cats often engage in this behavior when they want attention or food, associating rubbing with positive outcomes like getting fed. While it can seem like affection, it's also a natural instinct tied to communication and survival.