1 Timothy 5:24-25(New Living Translation)
24 Remember, the sins of some people are obvious, leading them to certain judgment. But there are others whose sins will not be revealed until later. 25 In the same way, the good deeds of some people are obvious. And the good deeds done in secret will someday come to light.
There is a natural law that exists in life, and that is that when you do wrong, whether blatant or in secret, it will always be found out. The best example of this was when our kids are young. No matter what they did wrong, and especially if they tried to hide it, we as parents always found out. After awhile, they soon learned that it was better to behave, or quickly confess when they did something wrong, rather than to be discovered later.
Unfortunately the lessons don't always carry over to adulthood, and yet the consequences are much more severe. It's easy to see when people are doing wrong, but even though others may do their wrongdoing in secret, they will eventually be found out. That is just the way it is in this life that God has given us; our sins will always be found out, and they will always require justice.
There is a contrast to that when many who do good things out in the open get recognized for their good efforts, but even those good things we do for others in secret, God will eventually reward us. Just as the sinful receive justice, the good works done for God will receive reward.