This chapter is about Esau’s legacy, and his kin are called the Edomites.
The phrase these are the generations is repeated ten times in Genesis. I understand those phrases to mark the beginning of a new scroll, in much the same way an author begins the new section of a book. My best conclusion has Joseph as the author of this section (36-50), and Moses as the editor. Normally I would say Moses was the final editor, but a great clue is left for us in verse 31 – these are the kings who reigned in the land of Edom before any king reigned over the Israelites. Only someone editing after King David arrives on the throne could write such a thing. My money is on Ezra inserting that comment to provide a bit of context for us, but I could easily lose that bet.
I find Moses placement of Esau’s genealogy here rather interesting. Moses begins, ends, and inserts in the middle of his editorial (v.1,8,43) a profound point, Moses wants you to know Esau is Edom, why?
Moses edits this chapter from the wilderness, and he is remembering how the Edomites created some serious challenges for him when he wanted to pass through, and he sets up that future drama for your understanding right now, including a not so subtle poke in the eye about the problematic Amalekites being related to the Edomites (Esau).
Esau, seeing Jacob pass through his lands and reside just close enough to make him feel uncomfortable, chose peaceably to move south of the Dead Sea, and farther south to the waters of Aqabah and inter- married with those around him. In this case, Esau and his kin did the opposite of his parents wishes.
The genealogy repeatly takes note of prominent women we know nothing about.