There is a Midrash Says at the end of Parsha Breish’t (pages 78-80) which is prelude to No’ach and the Mabul. It speaks about Hashem, as it were, Bemoaning His Making of man. The Melachim say to Hashem that they would do far better than man and would sanctify Hashem’s Name. So they came down and were more evil than man.
The Melachim were referred to in Torah as “the sons of judges”, “the lofty ones” for “they took for themselves wives from whomever they chose. And so Gilui Aroyot (coveting illicit intimacies) became the “right of passage” expected by the “lofty ones” — the powers to be of the era and this evil became institutionalized,