Esau sells away his birthright, but see this was before determined by God's will.
This teaches the main point that God shows His sovereignty over what man thinks should happen according to the natural order of things.
According to His will, God chose to love Jacob and hate Esau, before they had been born and done anything good or bad.
This is according to God's will and purposes, really known only to Him, but that will of God is all powerful everywhere.
Before their birth God tells Rebecca,
Genesis 25
19 This is the genealogy of Isaac, Abraham’s son. Abraham begot Isaac. 20 Isaac was forty years old when he took Rebekah as wife, the daughter of Bethuel the Syrian of Padan Aram, the sister of Laban the Syrian. 21 Now Isaac pleaded with the Lord for his wife, because she was barren; and the Lord granted his plea, and Rebekah his wife conceived. 22 But the children struggled together within her; and she said, “If all is well, why am I like this?” So she went to inquire of the Lord.
23 And the Lord said to her:
“Two nations are in your womb,
Two peoples shall be separated from your body;
One people shall be stronger than the other,
And the older shall serve the younger.”
24 So when her days were fulfilled for her to give birth, indeed there were twins in her womb. 25 And the first came out red. He was like a hairy garment all over; so they called his name Esau. 26 Afterward his brother came out, and his hand took hold of Esau’s heel; so his name was called Jacob. Isaac was sixty years old when she bore them.
After Esau sold his birthright, Esau despised his birthright. And Esau also does not get the blessing.
Infact Esau can not repent even though he sought so with tears.
This was fore-determined by the Lord from before either was born, to demonstrate to all the election of God beforehand of persons,
in saying it this way,
11 (for the children not yet being born, nor having done any good or evil, that the purpose of God according to election might stand, not of works but of Him who calls)
Romans 9
10 And not only this, but when Rebecca also had conceived by one man, even by our father Isaac 11 (for the children not yet being born, nor having done any good or evil, that the purpose of God according to election might stand, not of works but of Him who calls), 12 it was said to her, “The older shall serve the younger.” 13 As it is written, “Jacob I have loved, but Esau I have hated.”
Hebrews 12
16 lest there be any fornicator or profane person like Esau, who for one morsel of food sold his birthright. 17 For you know that afterward, when he wanted to inherit the blessing, he was rejected, for he found no place for repentance, though he sought it diligently with tears.
Esau was rejected before his birth because Esau was not called according to God's purpose regarding His election of people. Jacob on the other hand was called according to God's purposes and was elect before his birth.
Salvation is not of a persons works but of Him who calls, and only according to His purposes, not the purposes of any man. And salvation is not based on us having done anything good or evil. That is the whole point of Esau and Jacob in teaching us about God's electing love of certain persons before they are born, before they do evil or good, God elects them to be saved, and others are not elected to be saved.
IF you love God, then you will love Christ, and the reason you love them is that God has called you according to His election for His purposes. This truth is shown here also.
Romans 8
28 And we know that all things work together for good to those who love God, to those who are the called according to His purpose.
29 For whom He foreknew, He also predestined to be conformed to the image of His Son, that He might be the firstborn among many brethren.
30 Moreover whom He predestined, these He also called; whom He called, these He also justified; and whom He justified, these He also glorified.