Paul often used Old Testament stories to reveal deeper spiritual truths. Here, he unpacks the story of Sarah and Hagar to explain the difference between two kinds of 'children' under God.
Paul is drawing a powerful allegory here. The 'barren one' is Sarah, representing the 'Jerusalem above' – the true people of God, made free by faith in Christ. She is 'barren' because, before Christ, this spiritual family wasn't yet fully formed. The 'one who has a husband' is Hagar, representing the 'Jerusalem that now is' – those who try to earn God's favor through the Law. In the Old Testament, God's relationship with Israel was often described as a marriage. Hagar, through slavery and her son Ishmael, represents a life lived under bondage to rules and human effort.