Especially for women: "Her beauty was enhanced by flight" (Loeb translation by F.J. Miller; Latin: "auctaque forma fuga est"/beauty was increased by flight). The context is Daphne fleeing the amorous Apollo in Ovid's Metamorphoses, Book I.
The advice is not necessarily that of playing hard to get, but rather of requiring certain prerequisite behaviors by one's suitors: consistent and habitual respect, attention, kindness, and generosity, all to be proven by concrete action before any commitment of any kind is made, formally or informally.
In contrast, what we see often is that the whole package is delivered very quickly and then follow the inevitable recriminations and complaints. Then follows the inevitable break-up with its own emotional costs. It's like hiring an employee without an interview and without a probation period and then going through a traumatic firing. On second thought, it is a rational variety of the genus "playing hard-to-get," which is, after all, a good and necessary thing, but which requires someone whole enough to implement it.
(Image of Apollo and Daphne in public domain)