Obviously you did not understand.
Someone who has done good and is pure, but does not believe in God...has he even heard of God? If he has not...then theres a chance he will go to heaven. Because this person believes they are doing the right thing their whole lives, they are convinced they will go to heaven.
If you were a Muslim, and followed God your whole life, worshiped and prayed 5 times a day and did everything a good Muslim should do, will he go to heaven? Yes, because he is judged on his knowledge of God. However, someone who knows God, but rejects him, goes to hell. Understand?