I Samuel 2:6 The LORD killeth, and maketh alive: He bringeth down to the grave, and bringeth up. 7 The LORD maketh poor, and maketh rich: He bringeth low, and lifteth up. 8 He raiseth up the poor out of the dust, And lifteth up the beggar from the dunghill, To set them among princes, And to make them inherit the throne of glory: For the pillars of the earth are the LORD’s, And he hath set the world upon them.
Hannah had asked God for a son. God had heard and answered her prayer. She prays after getting God’s answer. Her prayer contains this praise. She acknowledges that God is in charge. He is all-powerful.
The Lord God controls whether you live or die. Lord determines whether you will be rich or poor. He is an all-powerful God, and she acknowledges that.
Then she says that He will lift the poor out of the dust. He gives people that do not deserve things because they have asked Him. Her statements about His power are not bitterness or pessimism. She merely is recognizing His power.
Her point is that He is so big, so powerful that He can hear prayer and answer it. He can do for you if you will ask Him. I think this is an Old Testament illustration of, “You have not because you ask not!”