I read the joke mostly as a joke at the expense of those who would think two men wearing similar outfits would be gay. In other words, a light-hearted joke about a (mis)conception some people have. I cannot in the slightest see how the joke is homophobic.
And also, it suggests cops are homophobic, of course. Which would be true in some countries.