Why does this male friend of mine flirt with me when he has started dating another girl recently?

We tease each other a lot and we went on a date months ago which I didn’t realise was a date and he took it as a rejection. The girl he likes now knows we went on a date and we’re in the same social circle and he said to me “you rejected me six months ago and I’m still paying for it now”. What’s going on? He does seem to like her but I’m getting mixed signals..
Why does this male friend of mine flirt with me when he has started dating another girl recently?
Post Opinion