Since the Lord had closed Hannah's womb, her rival kept provoking her in order to irritate her. (1 Samuel 1:6)
Why God had closed Hannah's womb will remain a mystery until the Almighty reveals it to us. Perhaps he did it to bring glory to himself after opening it later and Hannah finally gave birth to six children; perhaps it was to make Hannah a woman of prayer or perhaps he was checking whether her husband Elkanah would love her even though she was barren. The reasons could be many..
No amount of rebuking the devil can open something that God has closed. Sometimes it's difficult to pinpoint the cause of suffering in a believer's life. But prayers and tears work miracles as we see in Hannah's case. Never give up praying or crying out to God. As a father has compassion on his children, so God has compassion on those who fear him.
Dr. Johnson Cherian