But to Hannah he gave a double portion, because he loved her, though YHWH had closed her womb.
1 Samuel 1:5

Elkanah gave childless Hannah a double portion as if she had born his first-born son. This is reminiscent of the prophecies concerning "a people who were not a people" and "blessed are the barren".

Peninah was blessed with children but unloved. Hannah was cursed with barenness but loved. This reminds me of Leah and Rachel. Hannah didn't conceive because Elkanah repented of polygamy or favoritism (he hadn't). She conceived because she cried out to God and believed, and it glorified God to give her a child.