Becasue he probably has sensed that you like him,
thinks you enjoy the flirting,
and gets a big
ego boost from it.
He will tell you he likes you because that is an easy answer,
(it`s not telling you he fancies you nor telling you that he doesn`t like you either)
If he`s been flirrting with you for a while,
he probably won`t want you to think bad of him,
even though it is bad of him to lead someone on.
If you have spoken about it and know for sure
he does not want an affair but you do,
then you should leave it at that.
Back away from him and stop the flirting.
You will have a reputation for being a tease.
If you like him a lot,
he will only confuse you further,
keep you hanging on for the attention he receives,
and you will end up feeling used and very hurt.
If he feels anything for you at all,
he will let yoou know,
not by flirting but by telling you outright.
I hope you don`t get reeled in by this.