Question: what does it mean when a guy hugs you in front of his girlfriend?
Answer: He's just probably friendly, it's probably this way he shows affection to others. Hugs are pretty common for me, i wouldn't keep them only for the girlfriend. To answer your question why he'd do that, probably to show you affection, to show his friendship for you. ... He is giving you a friendly hug.