As someone who identifies as both an extrovert and introvert (according to my Myers-Briggs test results), having a nice balance of social time and also a secure sense of my own personal space is very important to me. I love getting to know people, and can actually be pretty touchy-feely with the people in my life who are close to me. But until I've decided that we've gotten to that point, too much physical contact makes me pretty uncomfortable.
I value the agency I have over my own body, and I don't like feeling pressured to do things that I don't want to do.
As we all know, hugging involves wrapping your arms around another person and squishing the front of your body up against theirs. It's a pretty intimate thing to share with someone if you think about it, especially a person you don't really know. I've always been the kind of person who keeps my distance until I feel completely comfortable. I don't share much personal information, and I definitely don't touch unless I've deemed the trustworthiness of that person. A handshake is more than enough when I meet someone for the first time (and the next few times after that).
I value the agency I have over my own body, and I don't like feeling pressured to do things that I don't want to do (the idea of consent is applicable here too, FYI). But I feel like there's a lot of pressure to hug people when you're introduced to them or when you run into someone you barely know in public, and I've never really understood why. When an acquaintance of mine goes in for a hug, I return it out of a sense of obligation either to a social standard that's been set over time or to spare their feelings. So, I do it reluctantly, which makes me feel even worse, because aside from not wanting to hurt their feelings by not hugging them, I also don't want to give someone a half-assed hug because I felt as though I had to. If I'm hugging someone, I want to really mean it.
I understand that as humans, our initial tendencies generally lean towards physical touch. But it's important to keep in mind some of the issues that may cause others to not want that physical affection, especially from strangers. For me personally, busy public places can cause a lot of anxiety. I get overwhelmed easily and physical touch can make my sensory overload even worse. For others, it can be self-esteem and body image discomfort, fears or phobias, or even negative past experiences with physical touch. The point is to be mindful that not everyone always feels the same or has had similar experiences to you, so discretion (at least until there is an established relationship) is key.
It's not that I don't like you, it's just that sometimes close physical touching makes me uncomfortable, and there's nothing wrong with that. Even though hugging can feel like the "right" thing to do in some cases, just stop and think about it before you go in for one. I've found that a lot of people who feel the same as I do are also open to talking about the issue. So, if you're sensing that someone in your life may be uncomfortable with hugging or other physical touching, there's never any harm in asking about it (as long as you respect the answer). At the end of the day, some people really just don't want to be hugged by strangers (or acquaintances), and that's OK.