This miracle reveals Christ's divine and human natures. As God, He withered the tree in judgment. As Man, He needed the sleep His friends' home in Bethany provided as well as the tree's food to sustain Him, as “He was hungry.”
Although He could have satisfied His hunger with a miracle, He showed self-restraint in the use of His supernatural power to teach a valuable lesson to His disciples. He would not use it to provide for His personal wants or for those of His disciples. Nor would He work a miracle just to impress others. He would not do so to increase His earthly influence or power or to terrorize people into accepting His teaching. If a need could be fulfilled by human effort, or if lessons would be useful, Jesus would do no miracle.
Self-restraint requires faith. Jesus used this event to teach His disciples a lesson in faith because, if they had genuine faith in God, they would not only be able to affect nature miraculously as Jesus did with the tree, but also move mountains (Matthew 17:20). If they truly believed and asked according to God's will, they would receive whatever they prayed for.