Concealing some things leads humans to blissfulness in this world and the world of Hereafter.
About the fact that one should, in some occasions, conceal their acts , Imam Ali (pbuh) says:
Before 7 groups of people, conceal 7 things, and then become blissful:
1. Don’t talk about your property before the poor.
2. Don’t boast your health before the ill.
3. Don’t exhibit your power before the weak.
4. Don’t rejoice before the sad.
5. Don’t show proudly your freedom before the imprisoned.
6. Don’t talk about your children before parents with no child.
7. Don’t talk about your parents before orphans.
Source: Tuhaf ul-Uqoul p. 167