And part of it was because of how you were raised. Neither is an excuse, true enough. As a person gets older and begins to experience life, they should hopefully begin to see and understand any short-comings they might have been raised under, and work on change. In your case, you know that you were raised being taught to hate anyone who was different from yourself. You came to realize that that is wrong. THAT is why this incident bothers you - you learned. Not exactly the ideal way to learn, but learn you did that how you were raised was wrong and hurtful.
You've also grown and realize that part of what you took out on another person, was the anger inside of yourself as a bi-sexual and transgender individual. But even that hate was taught and learned because our society cannot deal with diversity. You hated yourself because what you were being taught made you believe there was something wrong with you.
And something occurred to me while reading the recent posts - the guy you beat up, could possibly be suffering his own self-loathing for being gay. Self-loathing that he learned to subject himself to because of society. It's possible that he's walked around all this time believing that he deserved that beating. A very sad thing to think, to consider. But it's possible. Could be he's also been hurting all this time for similar reasons as your own.
-Mike