Why would a guy think or believe that a girl likes him especially when he is unavailable, when in fact she never even did?

This guy at work thinks or thought that I’ve had a thing for him or In other words that I like him but yet he is unavailable and I’m not interested in man who are in that position, yet he literally told me that I like him and he won’t deny it I mean even if let’s say I did is that a bad thing bc I don’t want to give him the wrong impression maybe he didn’t like me or doesn’t at the moment and I don’t want him to be discussed about it that I like him so I don't know if it’s a bad or good thing but I made it clear that I don’t like him yet he still tries to be all sweet to me I don't know

Why would a guy think or believe that a girl likes him especially when he is unavailable, when in fact she never even did?
Post Opinion