To convey a higher value. It’s easy to do, any girl can do it, and most of them do.
Two examples from my experience: high school girl who liked me, calling me all the time, made my homework, helped me. At the first sign I liked her, she started playing hard to get. I ignored her. After high school she became gf of my close friend just to be in my social circle. My buddy complained for a year she didn’t let him even kiss her. She married a guy and moved in the states. 20 years now she keeps calling me.
Second example: girl 10 years my junior, work colleague, used to slip cut out paper hearts in my daily planner, came every day into my office. After I left the company she called me after one year. After another 2 years we met by chance, took her out for a coffee. From that moment she started playing hard to get. Ignored her, after another 3 years we met by chance and she said when I take her out again.
So not all the time she is not interested.