How do we explain the acceptance of pederasty in antiquity and its transition to a taboo sexual relationship biologically?

How did the tale of Zeus and Ganymede become sordid?