"On the following day, when the people who were standing on the other side of the sea saw that there was no other boat there, except that one which His disciples had entered, and that Jesus had not entered the boat with His disciples, but His disciples had gone away alone--however, other boats came from Tiberias, near the place where they ate bread after the Lord had given thanks--when the people therefore saw that Jesus was not there, nor His disciples, they also got into boats and came to Capernaum, seeking Jesus. And when they found Him on the other side of the sea, they said to Him, 'Rabbi, when did You come here?' Jesus answered them and said, 'Most assuredly, I say to you, you seek Me, not because you saw the signs, but because you ate of the loaves and were filled. Do not labor for the food which perishes, but for the food which endures to everlasting life, which the Son of Man will give you, because God the Father has set His seal on Him.'"
On the day after they had been miraculously fed by Jesus, the multitude wondered where Jesus had gone since the only boat that had been there had left without Him the night before (i.e., the boat the apostles were on).
For whatever reason, some ships from Tiberias arrived on the eastern side of the Sea of Galilee (i.e., near the location where Jesus had fed 5000). Since He evidently wasn't in the area any longer, the people decided to board these boats and go to Capernaum in search of Jesus. They probably chose to go to Capernaum since it was known that Jesus frequently taught there. They likely speculated that this would be the best place to try to find Him--and they were correct.
They were able to locate Jesus, and they had a question of curiosity for Him - "Rabbi, when did you come here?" (John 6:25). The question they ask is more than just an inquiry as to what time He came to the location. It is implied that they also want to know how. John, of course, had already revealed the answer to his readers--Jesus had walked on water out to the boat the apostles were in (6:19-21).
Jesus, however, knowing their hearts (cf. 2:24,25), ignores their question and exposes their true motive in seeking Him - "You seek Me, not because you saw the signs, but because you ate of the loaves and were filled." They crossed the sea, not because they had understood the signs that Jesus performed validated the words He had been proclaiming, but because of a free meal He had provided! He was offering to meet their spiritual needs; they were only interested in what He would do for their physical needs. They saw the miracles but missed the very point of them.
Friends, it is not enough just to seek Jesus--one must seek Him for the right reason. To seek Jesus for physical benefits alone is the wrong reason. To seek Him because He is the Messiah and deserving of honor is the right reason. Unlike some teachers today, Jesus wasn't pleased simply because multitudes were coming to Him. Had His aim been to gather large numbers of people, He would have continued filling their bellies and refrained from rebuking them. However, His love for them would not allow Him to do that. He would tell them what they needed to know (the truth), rather than what they wanted to hear. Unfortunately, doing such would soon cause His "following" to diminish significantly (cf. 6:66). That is because they didn't follow Him because of who He was, but because of what He could do for them (the case is much the same with the "friends" of the rich). They wanted physical blessings like healing and food, not spiritual riches or sermons on how to live!
Jesus instructed them in 6:27 - "Do not labor for the food which perishes, but for the food which endures to everlasting life, which the Son of Man will give you, because God the Father has set His seal on Him." Jesus doesn't literally mean that one should not work for physical food because such is commanded elsewhere (cf. II Thess. 3:10). He is merely pointing out their misplaced emphasis. They would go to all this bother (or "labor") to find Him just for free food, but they wouldn't do the same for a spiritual feast! Jesus is telling them that they should be more concerned about the higher needs of the soul (cf. Matt. 4:4).
It is important to notice that Jesus tells them to "labor" for spiritual food, in spite of the fact that He would "give" it to them! It is common to hear some claim that there is nothing for man to do to be saved, since salvation is a "gift of God" (Eph. 2:8). Yet Jesus says here that what He gives, they must work to obtain. This doesn't imply that they could earn it or by their own efforts be worthy of it, but simply that there are conditions with which they must comply in order to receive what Jesus gives (e.g., Josh. 6:2ff; Heb. 11:30).
These people should have known that Jesus was able to give them the food which endures to eternal life because the Father had set His "seal" upon Him. This simply means that He had placed His mark of authenticity upon Jesus (cf. Matt. 3:16,17; 17:2-5; Acts 2:22).