It is part of Ikhlas (sincerity) to do good deeds and conceal them.
Sayyiduna Abu Musa Ash’ari (Radiallahu Anhu) explains the difficult and hard times they experienced in the war Dhaat al-Riqa’. There were six people in a group and they shared one camel. Often they had to walk on rough terrain and their feet would get wounded. Their nails also fell off. They had to bandage their feet with pieces of cloth, hence the name of the war is Dhaat al-Riqa’. Riqaa means pieces of cloth.
After Sayyiduna Abu Musa Ash’ari (Radiallahu Anhu) mentioned this incident, he regretted mentioning it and felt he had exposed his good deed. He then stated:
مَا كُنْتُ أَصْنَعُ بِأَنْ أَذْكُرَهُ
“I do not do (good deeds) to mention it”
(Saheeh al- Bukhari, Pg.592, Vol.2, Qadeemi)