Social learning - Police officers grew up in an environment whereby gays and lesbian were view by the society as extremist militant types and therefore they grew up with that perception in mind and when the join police, they still have the same perception which lacks basis.
Labeling - This has been as a result whereby the police officers just label them that way and this behavior which is a pure stereotype has been there since. When the new police are recruited, they also adapt the system and just view gays and lesbians as extremist militant types.
Society perception - most of the people in the society views gays and lesbians