Jesus felt pity for the crowd, for they were like sheep without a shepherd. His response to their helplessness may surprise us. He did not immediately provide them with shepherd or work miracles for them. Instead "he began to teach them at great length", apparently it seems that he felt that teaching them was the greatest form of mercy his pity for them could provide.
On another occasion (Jn 8:31-32) he promised us that we would know the truth and the truth would set us free. Perhaps he sensed that his revelation of God's truth to them through his teaching is what they in their pitiful state needed most in that instance.
We can never know precisely the relation of his pity for them and his decision to start teaching them a length. At least one formerly well-known psychologist explained that faith or its concomitant understanding was a form of healing.
Applying this story to ourselves, we may acknowledge that at times we feel like sheep without a shepherd, but the light of our faith can open our hearts to God's presence in our lives and the healing power of our hope in Christ which our faith in God can foster in our hearts and souls.
Lord Jesus, in these troubled times,send us shepherds to guide us along the way of truth.