Abraham had two children, Isaac and Ishmael. Ishmael was first-born, but the line of Israel came through Isaac. Then Isaac had Esau and Jacob. Esau was first-born, but gave away his birthright and the line came through Jacob. The Jacob had a whole bunch of sons, but the one God used for his purposes was Joseph, nearly the last of the twelve.
Why this emphasis on the first-born not being the important one?
I don’t think it will do to say, “There is no significance. It just happened that way historically.” Old Testament Jewish readers, at least, would have expected the pattern to mean something important to their identity as a nation chosen by God.
Does it emphasize that being the chosen people is up to God rather than man? (Compare Romans 9:11). Or that God is more concerned with a person’s heart than his position? (Compare 1 Samuel 16:7). It can’t be straightforwardly Messianic: Jesus is definitely pictured by a first-born, not a second-born, son. (John 3:16, Colossians 1:15).