Guys, why would you mention your girlfriend right away (almost randomly) when first meeting a woman?

Was talking to a work acquaintance i just met over lunch. The conversation was flowing / engaging and we were most having a nice time when he suddenly worked his girlfriend into the conversation. It felt quite random and off and made me wonder if he thought I was hitting on him (I wasn't)

He then followed-up later to let me know he really enjoyed our conversation.

I've heard guys mention their SO / girlfriend as a self-policing behavior. Is that the case or was it more of thinking I was hitting on him?

Would be nice to know so I can watch out for my behaviour if I'm giving off certain vibes

Guys, why would you mention your girlfriend right away (almost randomly) when first meeting a woman?
Post Opinion