Jesus told this parable not to imply that works bring salvation, but to show that there are many who only pretend to know and love God, saying the right things, observing the right rituals, but never truly living a changed life that loves others like He has loved us.
The following is a poem by Robert Brault that could be addressed to the goats at Jesus' left hand.
I was hungry
and you hurried into McDonald’s
and acted like you didn’t see me at the door
Thank you.
I was imprisoned
And you crept off quietly
To your chapel in the cellar
To pray for my release.
I was naked
And in your mind you said
Surely he’ll find the local Goodwill store
I was sick
And you knelt and thanked God
For your health.
I was homeless
And you preached to me
Of the spiritual shelter
Of the love of God.
I was lonely
And you left me alone
To pray for me to find a friend.
You seem so holy;
So close to God.
But I’m still very hungry
And lonely
And cold.
So where have your prayers gone?
What have they done?
What does it profit a man to page through his
Book of prayers when the rest of the world
Is crying for help?