Why would a guy hesitate to tell you he has a gf?

So recently I had the nerves to approach my crush after 3 semester of not ever speaking to him. He knew about about my feelings my first semester in college (would be a long story, but HE KNEW). After the 1st semester, my 2nd and 3rd semester i stopped showing signs of interest but he was always staring at me. Now this being my 4th semester, his friend called me over to tell me my crush been checking me out for quite a while. My crush shyly and smilingly deny it. His friend was quite bother telling him to stop being shy. Crush couldn't really make eye contact. Friend said we should exchange number but my crush stood there all quietly and shy. I asked him if his job doesn't permit it and he said "no, I'll tell you why." Some girl interrupts him for 1 minute. Then he says "i have a gf" and looks down at the desk without making eye contact. I just said i respect that. Why couldn't he say this from the start while his friend was trying to get us together from the start?

Ps -I'm attractive face and body wise.
Why would a guy hesitate to tell you he has a gf?
Post Opinion