This is such a great thread! I have had this conversation with my therapist over and over again. At first, I really didn't understand the why he would not give me a hug.
I'm one of those people who touch is really a big deal for me because I did not get that affection from my father. So no sexual abuse, but I definitely have huge attachment issues, and I was one of those people thinking hugs would just solve everything. (I've since found someone else to hug and realized there's more to it than that, but it's still incredibly helpful for me.)
Eventually I talked to my therapist about how I felt rejected by the fact he didn't want to hug me. So he clarified with me that it wasn't that he didn't want to hug me, he had issues with touch and also he was setting that boundary to keep me safe. He said he sometimes did get the urge to hug me, but he it was a boundary he was making himself keep.
That really helped me see that he did care about me, and that was one of the things I really wanted from the hug. That is not to say the feeling of wanting a hug has stopped coming up; it still does from time to time. But I trust him and respect him enough that I can accept that boundary. I'm still not sure I totally agree about the whole keeping me safe thing, but it's okay if we have different opinions on that.
Also, he does still allow some touch. So he has put his hand on my shoulder a few times when I'm really upset or disassociated. For a long time that was the only thing that would ground me when I was disassociating. Now I don't feel like I need that from much anymore, and I have not requested it in a while. But he does give me a shoulder squeeze at end of each session. We agreed on this after one of the conversations on hugs. So I still feel like there's a bit of connection, and the consistency of it helps me feel safe.