Male homosexual relations allowed non-procreative sexual practices and were not seen as a form of identity. This is the case of the term Eunuco, defined in the DRAE as a synonym for homosexual or effeminate man. This latter is what seems most likely explanation for the slang, as this same process is repeated in many other words, such as Pato. AMS Press. It seems the term is associated with another gay slang term, well known, which is Chapero, derived from Chapista, with slang meaning of hustler, and with the literally meaning of person who works with metal sheets, a panel beater. Nonetheless, he has earned his spot on this list because he paid his dues by winning 9 Goyas and one Academy Award.
As the question could offend heterosexual men, gays used this expresion because only gays known it.
Generally speaking, however, a kind of pederasty not unlike the one that can be found among the Greeks was dominant in Rome. There he spent time with his mother who was a seamstress and then went to apprentice in tailoring. The word of god. The word sodomita among of being used as an insult and religious and legal texts has been used too in medicine, natural sciences, and anthropology.
Today it is used normally without the negative charge.