Muhammed bin Mansoor (rahimahullah) narrates the following incident:
On one occasion, while we were in the musjid, seated in the gathering of Imaam Bukhaari (rahimahullah), a certain person in the musjid removed some dirt from his beard and threw it on the ground. I looked towards Imaam Bukhaari (rahimahullah) to see whether he had noticed what the person had done. I observed that Imaam Bukhaari (rahimahullah) looked at the dirt on the floor and thereafter shifted his gaze towards the students in the gathering.
Later on, when he felt that no one was looking, he picked up the dirt from the floor and placed it in his sleeve. Thereafter, when he exited the musjid, he removed the dirt from his sleeve and threw it on the ground.
Through observing the conduct of Imaam Bukhaari (rahimahullah), I realized that he wished to keep the musjid clean from dirt, just as the person wished to keep his beard clean from dirt.
Note: This incident reveals the great respect that Imaam Bukhaari (rahimahullah) had for the house of Allah Ta‘ala, as well as the high level of ikhlaas and sincerity which he was blessed with, that he did not want to reveal the good deeds he did before people.
(Hadyus Saari pg. 481)