Confidence is normally boosted when you have a gf, and certainly you look a lot happier, which in turn makes you smile...natures best make-up, making even the ugliest look great!
So it is no wonder why girls in the public like to check out guys who have girls around them...because everyone looks good when they're happy...
The topic of having what they can't have is somewhat right...but to be honest, most girls will find it being unethical and nothing will probably result...
But in truth, guys might just be too sensitive about girls looking...i mean the girl could've been just staring at some dress in the shop window behind you...