The sheep didn't recognize Jesus in the hungry, thirsty, naked, sick, imprisoned stranger but they provided help anyway. The goats didn't recognize Jesus either but it sounds like if they had they would have done something about it. That’s why this text is not about works righteousness and neither the reward nor punishment is about what you do or don’t do. It is about who you are because “being” and “doing” is the same thing. The sheep were motivated by the obvious need of others and did what they could to alleviate the suffering of the Jesus hidden in the sick and isolated. For whatever reason the goats were not motivated by the obvious need of others and so did nothing to help the Jesus hiding in plain sight. So if you see this text as primarily about gaining reward or avoiding punishment you've missed the point and perhaps the Jesus hiding in the needs of others. It should not come as a surprise to those who claim Christ as King that God is interested in the welfare of those who live on the margins, after all Jesus was born into poverty and died a naked, thirsty stranger imprisoned by nail and wood.