feelings getting hurt in the end

why do I do things that I know will hurt my feelings in the end? for example talk to a guy that I'm so down for and he knows and he so to speak says he's down for me too but I know he's all just talk. but I still continue to talk to him via messages