What made him not say he has a girlfriend?

I’ve been talking to this guy I found really attractive at my work and I eventually asked if he had a Snapchat. He told me does but he doesn’t really use it, however he was genuinely very sweet with the rejection. I find out later on by someone else that he actually has a girlfriend. I just wonder why he didn’t say he had one when I asked for his snap. I guess I could of asked specifically if he had a girlfriend first.
What made him not say he has a girlfriend?
Post Opinion