The bible tells us to seek what is good and noble. Often it is important to seek these things for their own worth. If is easy to seek these things for the wrong reasons.
It is easy to do good things if they are for our benefit. It is good press to be seen doing good things in public or mention in public all the good we have done.
It is not that it is important that others never see us do good works. The reality is that often good works will be seen. What is important is our spirit. Do we do the good works because we seek to please God or do we do them because we want to impress people.
I suppose a simple test is if our first reaction when we do something good that few people know about is to go and tell others. You see often it is the case that the people who do the least good spend the most time telling others about the few good things they have done.
Motive is always important in theological ethics. God looks at the heart and judges actions in part by motive.
This is why the bible often tells us to do good in secret and not before men. It is not that our good works should never be seen, but that we should desire to do good works unto God and not before people.
In the end we should care what God thinks and not what people think. If the whole world views us as foolish but God sees us as righteous than what does the world's view matter. You see this repeated in the bible. The world thought Noah was foolish, but not God, and at times the whole world doubted Moses.
You see in the end only one opinion matters and that is of the Lord of Heaven and earth. All other opinions matter only in relation to that one opinion. Of course that is not a call to a standoffish attitude. But rather a call to realize that we may at times be doing what is right and everyone may see us as foolish.