i am 21 old guy and most of the time i would look at girls think about girls... but for years i would get urges to fantasize about men sexually .. i would be minding my own bussiness and then a gay thought crossess my mind at first i try to ignore it but later i submit to my fantasizes... and i become completly attracted to something that i would normally find a turn off and not really appealing to think about... i had sex with two guys in my life and i only did it cause i was craving it... i mean i loved every second of it but soon as i climaxed the reality always hits me... that i don't want to be doing this... i need to be doing something else...
To me if you like it while doing it and the questions come after then you might be gay or bi as you say you still like girls.
That's society affecting you, because I was exactly the same way for YEARS. You think oh no, what will other people think of me? F**k them. But if you truly think it's a random obsessive thought, talk with your doctor. However that's probably not likely. It's ok if you think about males, it does not make you bad, or evil, dirty or anything like that. IT MAKES YOU NORMAL. The only difference is most people won't admit it.