S a result of his ministry as a prophet, John the Baptist died as a martyr. He had been the herald of the kingdom of God. In preparing the way for Christ (the Savior and King of Israel) John had preached fiercely against sin. Matthew 14:2-12 indicate that John even preached against the immorality that resided in the royal palace of King Herod. This ultimately cost John his head.
Once Jesus had commenced His ministry, John associated himself with Him intentionally. Jesus also connected Himself publicly to John. And, there were some definite similarities in their message, methods and following. So closely connected were they that some even considered Jesus to be a resurrected John.
In the chapter at hand, Matthew presents the story of "The Feeding of the 5,000" on the heels of the story of John's death. This was the kind of king that Israel needed, and they knew it. Of course, they had much greater needs too. And, Jesus was the answer.
After that, Jesus sent the droves of His satiated followers away and sent His disciples out onto the sea in a boat. Then, He spent time in prayer. After His prayer, He went for a walk on the water. He walked out to His disciples who were in the middle of a storm that night. Jesus calmed their fears and even invited Peter to walk on water too (Matthew 14:29). He can feed the hungry, walk on water, heal the sick, save the lost, defeat evil, etc. King Jesus is THE answer.