Many people lose their job for being gay but I've heard some stories about workplaces firing people who were homophobic/racist/sexist. Do you think it's right or wrong?
No. You have the right to dislike a person for any reason you want. If they're harassing or bullying people for being a different race or gay, then yes.
Only if they're expressing their beliefs in the workplace It's disgusting that gays have to lose their jobs for simply being gay, but two wrongs don't make a right.