Sociologists have shown that there is an innate need built into people where we need to have an "other" to hate.
Could we stop gay bashing? Sure. But, then it would just be some other group. You could get rid of gay bashing, racism and sexism, and then people would just beat up cat owners, or people who listen to Hall & Oates or something.
(Not that I'm against beating up people who listen to Hall & Oates.)