This probably wrong, but...

I think it has a lot to do with the demeanor of the person, how they carry themselves (non threatening) possibly scent as well.

I rarely have to ask someone given that the animal usually approaches me first. I usually just extend my hand (palm down and relaxed) watch their reaction, and most times, they give me permission to give them a gentle stroke on the head. They can tell you love them, even if you don't own them.

IF I don't see that "receptiveness", it's back off time.

BTW, I got both sides in my guys, Becca never met a stranger, and Sneakers doesn't like anyone (else).