From the Yahoo story titled Why Insects Have Gay Sex:
Researchers have widely examined homosexual behavior in mammals and birds, but have addressed it less frequently in insects and spiders. To assess the range of evolutionary explanations for same-sex intercourse in the invertebrate world, a team of biologists from Tel Aviv University in Israel examined roughly 100 existing studies on the topic and compiled the first comprehensive review of homosexuality in invertebrates. The review was published earlier this month in the journal Behavioral Ecology and Sociobiology. The team focused on male-male interactions to simplify the analysis, and found that most of these encounters occurred as accidents. Whereas larger animals have developed more complicated homosexual motivations — like maintaining alliances, which has been found in certain primate and seagull species — insects seem to mistakenly partake in it in a hasty attempt to secure mates.
The comments at the above-linked article are more amusing than most we see from Yahoo readers.