How can God deny a good person?

In our final recorded section of the Sermon on the Mount, Jesus declares that, to everyone who thinks they are doing good in the name of his Father, but who are not doing the will of his Father, he will give thumbs down! "I never knew you: depart from me, ye that work iniquity." YIKES!

Matthew 7 - Building upon a rock  

How many assume they are doing the will of God when doing good in His name? What is so bad about that? The churches are made up of such. It is much easier to be an active member of an active church so that you do not have to be concerned about doing the will of God. The structure is such that you can't miss! All the good things you do is the will of God. It's a no-brainer. BUT JESUS IS SAYING TO THESE: "I never knew you: depart from me, ye that work iniquity."

This is a radical departure from institutionalized religion, and such is the 1st Edition of Science and Health:

"Worshipping in temples made with hands; loving the world and listening to the demands of personal sense, is not the true worship. Then let the Christian who has grown away from forms and ceremonies, enjoy his worship in the right way, viz., Spirit and in Truth. If we come out from the world, as the Scripture demands, and are separate, we shall have its frowns instead of flatteries, and they will enable us, more than its favors, to be a Scientist."