I've had a similar experience with an ENFP female. If someone likes her, she isn't interested. If someone is NOT into her, she develops feelings for them.
I have no explanation other than the old theory about being afraid of love. If someone wants to love you, you know that it has a chance to be real so you subconciously are not interested (because of the underlying fear). But, if someone isn't available, already involved, or just plain doesn't like you, then you make them the object of your affection because the love won't be "real". If you get involved with a married person, then it's real, but not exactly - it's kind of "fake" because you're just a side dish to them. So, if it doesn't work out then the person who is fearful can just say, "well, I knew it wouldn't work. He's married." I have also seen situations where a fearful person likes someone who does not like them, then suddenly the other person decides that they DO LIKE the person and then the fearful person is no longer interested. They liked them, liked them, liked them, then when it had "reality" potential, they suddenly find a flaw and don't like them anymore.
Not sure it's an ENFP thing (maybe it is since NF's tend to idealize people), but I would say it's more of a "I've been hurt a LOT in the past, and I'm not going to let it happen again" - a sort of subconcious defense mechanism.
That's the common theme I see in everyone I've known to do this - they've all been hurt or had their trust broken in a very bad way.