Why would a guy flirt and talk every day to someone if he wasn't interested?

I've had a guy friend who is in his mid 20s for 2 years. I'm attractive and I get attention from many guys. I find it easy to distinguish between friends who strictly see me as a friend and those who don't. This guy has had that type of behavior that he's into me. In the ending of last year, we were in the same class at uni and he started texting me. He never let the conversation end. If it did, he kept asking me more questions either about me, or how my day was etc. More than once he told me he was very curious of the outfit I was gonna wear to different parties. So I sent him pics to which he responded that I look really pretty. And he didn't even HAVE TO say that because those outfits in particular were Halloween costumes. He'd also bring up that I'm pretty on many other occasions. He'd also say other flirty remarks. We'd be having a casual convo and I'd say something to which he'd respond "you're so cute when you lie :)" etc... I'm not gonna list everything flirty he said obviously but he was definitely flirting. We also said good night and good morning every day. We texted every single day for 3 months, and much of it thanks to the fact that he really kept the conversation going. Of course, I did also continue it but once the conversation was about to die he was quick to bring it back. We hung out once one evening, he stood close to me when there was a lot of space. He also touched my back many times (although I've seen that he hugs his girl-friends at school and put his arm around them sometimes), but still. After that, he started ghosting me. When he finally replied to me he started replying like every 3rd day or so. When uni started I confronted him and he told me "I must've given you the wrong signals". It makes me so confused because why would a guy spend so much time talking to a girl and ask her questions, every day for 3 months, as well as flirting if he never was interested? I for sure would never text a guy friend every day if I weren't interested.
Why would a guy flirt and talk every day to someone if he wasn't interested?
Add Opinion