well if you practise meditation regularly you learn the ability to push unwanted thoughts out of your mind but it takes a lot of practise and mental discipline to do so.
I recently read an interesting book -
The Pursuit of Attention: Power and Ego in Everyday Life: Amazon.co.uk: Charles Derber: Books - part of his hypothesis is that Women are generally (in western societies) socialised into attention giving roles whereas men are expected to take on attention getting roles in both formal and informal social interactions.
The result of this I believe is that in a friendship men are mainly competing with each other for attention (hence character traits such as assertiveness, competitiveness, egoism etc are considered masculine) whereas women in friendships tend to support each other and give each other attention (hence traits like nurturing, submissiveness etc are considered feminine traits).
So as a guy if you spend most of your life trying to get people to listen to you then along comes a woman and pays you lots of attention (as a friend) it can be easy to mistake this for romantic interest.
Also on the flip side it seems that if a man is paying a woman a lot of attention she is going to assume that he fancies her because typically that is not the natural behaviour of a man towards his friends.