Mine run away unless they have an itch, or they just want to interrupt my work. No affection, our relationship is purely transactional (and only one direction).
(Thats very unfortunate. i find myself blessed with a single shred of remaining sanity thanks to that cat. I wouldnt have been anywhere as ready for 2024 without him probably)
"My" (it's a stray that just hangs around) cat lets me mark him with my cheeks just fine. The only thing that seems to upset him is walking by without acknowledging his presence because when I do that, he screams and bites my ankles.
It's both. Domestic cats are social creatures. They possess at least rudimentary Theory of the Mind, so, understand that we are other beings, not objects. They identify their family unit through sharing and intermingling scent.
Cats are very scent-based, especially up close, where their eyesight is poor. This is observable when a cat displays aggression towards a "friend" who has the smell of the vet or a bath. From far away they look right but up close, they smell wrong - it's like a feline uncanny valley.