The last mention of a large crowd was during the feeding of the 5,000 (6:34). Jesus showed compassion in 6:34 because the people were "like sheep without a shepherd."
These stories show the concern Jesus has for the whole person. Here, he especially focuses on their hunger. They were in the wilderness and had no food (8:1,4). They had been with Jesus for three days without food and had traveled a long way (8:2). They needed to eat before going home (8:3).