Humanity isn't the only species where females have to put up with unwanted advances from males. Researchers from the universities of Copenhagen and Exeter looked into how other species deal with this problem. They hypothesized that females select more sexually attractive social companions in order to draw the attention away from themselves — that's right, that the animals chose hot friends so that males get distracted.
They tested the theory on Trinidadian guppies, which are apparently known in scientific circles for having high levels of male sexual harassment. They found that the non-sexually-receptive guppies were harassed less when paired with receptive ones, and that the non-receptive had a preference for such pairings. Even more interestingly, the female guppies choose their friends using chemosensory cues — the same cues that the males use to identify sexually receptive females. The receptive females showed no preference for their social companions.
While this paper does offer a possible view of the evolution of sociality and its relation to sexual harassment, as well as the less-obvious benefits of social companions, at this point we should caution against using this research to make broad statements about other animals — like, say humans. Guppies are very different from us, so let's not use this to make sweeping generalizations about the company people keep, okay?