Lots of people have said the same thing here's my "explanation" for this. The white martin was in Alex's mind and wanted to keep Supergirl away from finding Winn, the core, and figuring out there were two for as long as possible. The white martin figured out a way to distract Supergirl and it worked on two levels. I can't say if this is what the writers intended but it works for me. Since they made Alex remember I will give the writers the benefit of the doubt and say it was intentional.
I am with Brierrose on this. It makes sense that the White Martian would have tried to distract Kara by saying this; it was not Kara who brought it out but the Martian. As for her giving in to the impulse; she is after all human, and Alex leaving her probably greatly upset her. I don't think it signifies a lack of intelligence on her part. Just that unlike soldiers (like Alex), Kara is a more of a human (or Kryptonian, whatever; a sentient being

), who is also a social worker kinda person (as in, using her strength and powers for the good of all). Other than fight scenes, I am not sure she has been trained to be a soldier or a spy or someone who would know when they are being willfully kept from their mission; or when their own emotions are being used against them to distract them.
And her abandonment issues make perfect sense. I am so very glad for that evening at the end.
I liked this episode overall; loved having Vasquez back and hope she is here to stay.
And am sad that M'gann is going. I didn't expect that. Hope she will come back. Or, we could have an episode where J'onn, Alex, Kara and (may be Winn and Monel as well) go to Mars to rescue her.