Our desire to thank God is itself his gift, but how can we be grateful for a gift unless we knew our need. If we were perfect, our need would be revealed with the gift; as soon as we received anything from God, we would thank him because we would trust that the gift answered our need, but we fallen humans are ungrateful. It is necessary that we feel the need first if we are to be grateful afterward.
Jesus first heals people who felt their need greatly: the blind, the lame, and sick people of every kind. The crowd is amazed and glorifies God. Then, after three days, when the people had exhausted their supply of food, he sees an opportunity to give to these people what they desire. He loves them. He loves us.
What gift is too great for God to give? The apostles doubt that Jesus can provide food to satisfy such a crowd, yet this miracle is as nothing compared to the power of God and the love of God. What need can be greater than our need to be who God calls us to be, our need for sanctification, for justification, our need to be saints? If only we could feel how lacking and empty and useless our lives are otherwise, surely God would not fail to provide every good gift, to send his Holy Spirit into our hearts.