If you're isolated from the age when you become sexually active then you will associate sex (probably) with that isolation, frustration, and (for most men) porn consumption. Porn, in itself, isn't bad, but mix it with lack of social opportunity and frustrated sexual desire then you have a weird habit going on. I've felt angry about sex (and at attractive women) for many years, off and on, but have learned to put the frustration into context and analyze it. Sex is fairly boring most of the time, when you can get it, masturbation is quick and easy, and even if you were with an appealing mate you would probably still be miserable in some other way--sex just becomes a stand-in for what's fucked up with your life and life in general.