You were good for her and too her; and yet she left you for her crummy ex.
So, does it make sense? No. But, a lot of things about Life and Love never make sense. The only explanation that I can offer is that she never really got over him... all the time that she was with you.
Will she want to come back? Maybe.
But, the bigger question is: would you be willing to take her back?.... and, could you ever trust her again?