As a guy who flirted a LOT ... Just because someone flirts with you, doesn't mean they want a relationship. They may just enjoy the happiness it gives others, or enjoy the "back and forth" play.
*I* did it because I enjoyed the intellectual challenge of trying to "one up" the girls I flirted with, who flirted back (knowing I wasn't interested in a relationship).