An important question.
I spent most of my early years in the closet; people were either fooled into thinking I was straight, or they suspected I wasn't & immediately concluded I was therefore gay & in the closet. I internalised that & thought of myself as gay. When I met my current gf, 20 years ago, I was physically and emotionally attracted to her, even though I'd hitherto only been attracted to men.
For several years, my attraction to her was enough but then the attraction to men bubbled to the surface & I 'came out' to her as bi. I didn't want to tell her I suspected I was gay because I knew that would have ended our very special relationship. After several more years, I couldn't suppress my gay feelings anymore & had two quick, separate flings with young, very good looking guys. The experiences turned my life upside-down: I couldn't get an erection, didn't feel excited, or hungry for them, or even as if I was feeding the hunger that had built up inside me. To put it bluntly, I felt nothing, either emotionally or physically.
Burdened with guilt, I confessed. My gf stayed with me because she said she understood what had been building in me for years - I'd openly communicated it to her. She is the only person in the world who can turn me on, give me an erection & a satisfying orgasm. If I watch porn, or fantasise, nothing leaves me as flat or uninspired as gay sex. There has to be a woman. She has to be enjoying herself, and it has to be a straight situation (ie not MMF) in order for me to get off.
So I've had to rethink my whole identity. I'm not straight, but neither do I appear to be gay either. In my mind, I'm almost certainly bi, despite being attracted exclusively to men.