It's a pretty primal instinct
I remember the time my gay "mentor" took me to my first gay bar in Seattle. It was absolutely packed with men, I had never been surrounded by so many that closely, even in the Army. And many sweating with dancing, or just the heat & close confines.
I actually started to feel woozy and light headed. Yet incredibly euphoric. It wasn't a bad feeling, if new and a bit disorienting to me.
Years later I brought my BF with me to a gay dance bar in Minneapolis (the Saloon). Lots of the guys would take their shirts off on the dance floor, and so did my BF, having the body for it. I resisted, until he finally persuaded me. I was still around 155 at that time, at 5'8", so not too paunchy yet, even at 51, the last remnants of my Army build not yet faded.
And I nuzzled against his muscled furry chest as we slow danced, his skin a little sweaty, and again I experienced this woozy faintness. I hung onto him to stay upright. It remains one of my fondest memories. Dancing with the best hunk in the place, all eyes jealously on us, I got to experience that once in my life. The pick-of-the-litter in my arms, everyone's fantasy, gawky ugly me, though never again.
And on both occasions I've concluded that what made me woozy was the male pheromone scent. Plus the excitement of the moment. Confirming for me once more, as if I needed confirmation, that I'm biologically gay.
Because I never experienced anything remotely like that dancing with any female, or being around them. I'm a great believer in following where your body naturally leads you. And so our OP may be expressing his natural gay behavior. I'd encourage him to enjoy, short of being obsessive about it.