There are three lessons in these stories. First, all three acknowledge that evil and injustice exist. People are beaten and robbed on the way to Jericho. People are in prison, are naked and are hungry. And Zaccheaus reminds us people get ripped off by crime.
Crime has a dramatic and devastating effect on the community as a whole.
Evil and injustice do exist. Second, Jesus wants us to respond, to become involved. And of course the division of the sheep and the goats is based on how the nations had responded to injustice and need. Jesus wants us to respond. Third, there is a saving purpose in God's response to injustice.