It is not only blessed to give thanks; it is also of vital importance to our prayer life in general. If we have noted the Lord's answers to our prayers and thanked Him for what we have received of Him, then it becomes easier for us, and we get more courage, to pray for more.
God alone fully understands what each one of us needs; we make mistakes continually and pray for things which would be harmful to us if we received them. Afterwards we see our mistakes and realize that God is good and wise in not giving us these things, even though we plead ever so earnestly for them.