It is like a nightmare to be dreaming you were attracted to someone inappropriate. Why does this happen in a dream? Probably because during your waking hours, you were actively repelled by that person and used a lot of energy avoiding that person. During sleep, when you have surrendered to rest and your brain’s freedom to dream, it explores the possibility of hitting up with the most improbable subject. You may be able to remember and act the same way in your dream. That is to say, you will continue to repulse that person.