Why did this boy flirt with me and ask to hook up but then in front of his friends deny being interested in me?

I heard them talk about me asking each other if they would hook up with me and he said no. Why would he deny being interested in me in front of his friends?
Why did this boy flirt with me and ask to hook up but then in front of his friends deny being interested in me?
Post Opinion