Why did he glance at me a few times when I arrived and his girlfriend noticed him noticing me?

Then later in the evening, in spite of the fact there was plenty of space he walked right into me, brushing past. I was sitting down at the time. He used to stare, tease, make flirtatious comments a lot. But he’s had a girlfriend for months who he chose above me but still carried on with all of this. They spend a lot of time together it seems. But still when I’m around he tries to get my attention (we’re in the same friendship circles)..
Why did he glance at me a few times when I arrived and his girlfriend noticed him noticing me?
Post Opinion