Possibly because some people seem to "enjoy" the kind of relationship where they never quite feel secure, maybe they like the feeling you get at the start of a relationship, where you are not quite sure of the other person. By "treating them mean" then, you are not giving them any grounds to feel confident and secure in the relationship, so they won't become complacent and stop making an effort. There is a big difference between being mean to someone and retaining a slight air of mystery though, and I hope the phrase is largely used as a euphemism for the latter!