Asking with faith isn't a guarantee that God will do what you want.
In this case, God chose to make a righteous woman childless until she was willing to give her child to God. That child became Samuel. He became a prophet of God because Eli's children were evil and God had them killed. God gave her other children after Samuel.
RE: THE IMPORTANCE OF ASKING WITH FAITH