The primary purpose of Chapter 36 (genealogy of Esau) has already been realized. God would command the Israelites to destroy all the Canaanites except the descendants of Esau - so they had to know who they were.
That is not to say there is no value in this passage for us today.
We see here that, though Esau had no regard for spiritual things, he was a man of character. He had graciously received Jacob back upon his return from Haran, and when prosperity necessitated it, he moved away to allow Jacob to use the land (36:6-8). In fact, if God had elected one of the twins based on their likeability, He may very well have chosen Esau. But God's election is not based on our likeability or our works - and we see this in the example of Jacob and Esau.
We also see, that though Esau was not elected by God, he was still a recipient of common grace as seen by the prosperity he enjoyed in his lifetime. However, worldly prosperity and power does not equal spiritual blessing, which is an excellent reminder for us in a culture that values power and money so highly.
Not only did this record protect the Edomites, it also was a record of God fulfilling His promise to Esau - giving him his own identity, nation, and history. God is faithful and can be trusted to keep His promises.
This record also showed that Jesus was not born through the family line of Esau. It was very important to keep track of all the genealogies to show which ones were included and excluded from the line of Jesus.
The record also shows us that everyone counts in God's eyes. Everyone is made in His image, and He cares for each of us.
Chapter 38 we see some dirty laundry being aired. And really, it underscores the need for God's people to be kept separate from the pagan cultures around them. Judah (the son through whom the Messiah would be born!) married a Canaanite woman, had a pagan for his closest friend, and engaged what he thought was a cult prostitute. Something drastic would have to be done, and the exile in Egypt was God's remedy. They detested Hebrew shepherds and would refuse to intermarry with them - racial bigotry would help keep God's people pure.
This chapter also shows us, once again, that God is never limited by man's sinfulness to accomplish His plan. Thankfully, it seems that this episode was what made Judah take stock of his life, as we see later on as the Joseph story continues.
Unfortunately, none of these people lived out Romans 12. Thankfully, in Joseph's story, we're about to see the marks of a true believer.
Tomorrow's Bible In a Year Passage passage: Genesis 39-40, Romans 13