One of the images often used by the ancient church fathers was that of Christ as the physician of souls. Saints like Gregory of Nyssa would compare the work of a doctor where he would examine the sick person, make a diagnosis, and offer a prescription for a possible cure. The patristic writers would say that this what is analogous to Christ and the soul. He knows well what our "sickness" (sin, weaknesses) are. He makes the diagnosis and offers a cure: perhaps contrition, confessions, prayer, or even "Go and sell what you have and give to the poor."
How often in the Gospels do we read of Jesus meeting different individuals or even groups and acting like the great physician of souls, diagnosing, prescribing, curing? "He was moved with pity for they were like sheep without a shepherd ... Go and from now on avoid this sin ... Zacchaeus I mean to some to your house ... Simon, Son of John do you love me?" And, once again, "Go and sell what you have and give it to the poor...."
Jesus knew well the heart of the young man in today's gospel. It appears he is well on the way to righteousness but there seems to be something that stands in the of perfection - his attachment to the things of this world. Jesus sees this and offers the prescription. It is a hard one for the young man to hear but it was what he needed to hear.
Each one of us at times kneels before Jesus Christ, the healer of souls, the great physician and says, "Lord, what must I do to gain eternal life?" In the way of these things with the Lord, we will hear the answer. But can we follow the "doctor's" advice?