Why would he lie about having a girlfriend & lead me on?

This guy from work lead me on, compliment me on my hair & say I’m fine, show interest, get jealous when I don’t talk to him as much as I talk to others, ask me why don’t you come around me more I was waiting, tell me to text him back faster, say he would take care of me, say that he wants to do all kinds of stuff together because he has no friends, say he liked me back in a weird way (when I admitted I was starting to like him), & he never wants to stay away from me for too long he always wanted to be near me. We are coworkers.

He was checking me out and observing me b4 I even knew him. He ask for my Instagram & Snapchat and I said okay but I didn’t give it to him the same day. He was hoping. He made sure to I got his the next week. We connected so well like any good talking stage. We would talk for hours and he would say he enjoyed talking to me. He even asked would my dad like him cause we were somewhere and my dad was there and I mentioned it.

One day I told him that he is difficult cause of all the mixed signals & he said why you say that we ain’t talking like that we're just friends and coworkers. I texted him later on in the day and said I thought this was something but now I know it isn’t (even tho I didn’t mean it) he said it’s okay I’m not ready for a relationship we are cool though and always will be friends. When he said that I told him I understood (even tho I didn’t). Then I texted him a few days later asking why would he lead me on & flirt with me if you didn’t want anything else and he laughed denied it talking about he was probably being nice and he don’t come to work to make friends he do his job and go home let’s forget this ever happened, but we can still say hi and good morning when we see each other.
Why would he lie about having a girlfriend & lead me on?
Post Opinion