Why were Jacob and Esau chosen before they were born or had done good or evil?
Scripture states Esau and Jacob were chosen before birth, before doing good or evil, so that God's purpose according to election might stand—not of works or human deserving, but of the sovereign God. This shows election rests on God's purpose, while the invitation "whosoever will may come" leads to being chosen before the foundation of the world.
In the context, Rebecca conceived twins by Isaac: Esau and Jacob. While they were not yet born and had done neither good nor evil, the purpose of God according to election was to stand, not of works, not of what man deserves, but of Him—the sovereign God. Les explains this with the illustration of mankind moving down the river of life. On both banks are doors of opportunity marked "Whosoever will may come." When a person responds to that invitation, steps through the door, and looks back, the headpiece reads, "Chosen from before the foundation of the world." Thus the choosing is grounded in God's sovereign purpose rather than human merit.
(For the children being not yet born, neither having done any good or evil, that the purpose of God according to election might stand, not of works, but of him that calleth;)
See the rest