Men resemble the law of nature. You come closer, they feel more attracted. You pull away, they feel more distant and move onto some other planet's orbit.
The the most part, the opposite sex resembles the opposite. You come closer, they want to move away and maintain some level of distance. You move further away, they want to come closer and minimize the level of distance.
Now, like all humans, we're selfish and self-centered. We like to believe that everyone else thinks the way we do, and if they don't, they should. This helps self-validate our beliefs are right in relation to everyone else's beliefs which are either in agreement to our own (right) or disagreement (wrong).
So from your male POV, if you like someone, you think like a guy, and the thing you naturally do is try and be closer and minimize that distance (because you know what that would do for you and how that would make you feel).
From her POV however, if you like someone, you believe the guy you like thinks like a girl. And so, naturally, you try to create distance. Why? Because you genuinely believe that this will cause him to chase after you, or want you more, or value you more. Or that if you don't do these things, that he will value you less, want you less, blah blah blah. Is this how guys think? Of course not, but that's not the point! The point is how SHE thinks, and WHY she's BEHAVING the way she is. (well, that's WHY)
What can you do about her behavior?
Well, you can reward it, you can punish it, or you can be indifferent to it.
Let's see the three conditions in action:
Reward her playing-hard-to-get:
She plays HTG --> You chase after her and try to minimize distance --> makes her feel desired and wanted --> makes her feel good about herself --> acts as an emotional reward
This means that from that point forward, you would have programed her conditional memory to read something like this:
"If I play hard to get --> then he will chase after me, which will make me feel good and give me an emotional reward"
Punishing her playing HTG:
She plays HTG --> you sleep with her friend --> makes her feel dumb --> comes to realization that HTG didn't work --> emotional pain & punishment
This means that from that point forward, as more and more guys respond this way, the potential negative results from HTG will make her refrain from behaving that way.
Ignoring HTG: (recommended)
She plays HTG --> you give no response/reaction
She'll realize that by playing HTG, she's getting nowhere. By creating distance, you're not trying to close that distance that she's creating. She'll realize that if she continues to do this, they'll only be a world of distance she created b/w the two of you in an effort to comfort her insecurities and/or validate her low-self-esteem. Instead, she'll stop HTG and minimize that distance herself, and then interact with you like a normal human being; open and honestly.