No matter how many good deeds I do as a next-door neighbor to my friend’s billionaire father, I will not receive a penny of his inheritance. Even if my friend is lazier than me, has vices I don’t have, and doesn’t give alms like I do, he will get the inheritance and I won’t.
So it is with “good” people outside the family. of God. Those who have been invited to be adopted children of God as living, practicing members of His household the Church – but have said “No, thanks, I’d rather live on my own terms.” After death when they see others receive their inheritance in the kingdom of Heaven, who were not the “good person” they were, there will be eternal regret; or, as Scripture says, “weeping and gnashing of teeth” (Lk 13:28).
That is because it is first necessary to be a living member of His household before any good works become meritorious and take on transcendent value. This means: taking His name (Christian), being clothed with His grace (Baptism, Confirmation), sharing in His supper (Eucharist) regularly, from the altar of His home (the Church). Once you choose to be an active member of the family, it is then when living according to His rules (moral doctrine) takes its place as being necessary for salvation.
To use an appropriate metaphor, if you’re not aboard Noah’s Ark of the New Covenant (the Church), you will not be saved by your natural strength and swimming skills no matter how good they may be. There is no substitute for being a practicing Catholic, which begins with Mass attendance every Sunday, sacramental Confession on a regular basis, and following the authority of Christ through His body the Church. This is the foundation on which everything else rests.