Remember that women and men are wired differently and they run on different fuels. Women are emotional creatures while men are logical beings. Because of this fundamental difference, women value an emotional connection more than we do. We as men value the physical aspect of relations more and will seek to build and grasp the logic behind the paths of least resistance to successfully attaining that physical end product.
When a relationship ends, it takes time for the woman to unplug the emotional connection to the man. Anger, disappointment, or a quest for revenge may initially propel her to seek a replacement connection with another guy, but she forgets that like wine an emotional connection gets stronger with time, and is not replaceable at such short notice.
She showed high interest in you in an effort to try and instantly recover the warmth and comfort the emotional connection blanket she had with her ex provided her. She however subconsciously quickly realised that you couldnt provide what she was seeking in a ready-made instant meal package, without her having to invest the time required to ferment tasty aged wine, so she scuppered back to revive the connection she already had in the bag.
I would go as far as saying that you can date a woman post LTR breakup and be 6months in with her, but she would still run back to her ex if given the opportunity and conditions that permit her to do so. To counter this risk, a man has to hit the ground running and do everything within his power to build the strongest emotional connection with her in the shortest possible timeframe, in order to erase and obliterate any lingering traces of her former connection. Its the equivalent of a dog urinating on a pole to override the scent left by a rival dog.