He is drawing a proper, logical analogy.
Racism = hated of people of different ethnicity
Homophobia = hatred of people of different gender preference.
Racism / homophobia are both underpinned by hatred.
Behavior isn't ethnicity....unless of course you subscribe to comments like "act black/white/Asian".