The Messenger of Allah ﷺ saw a man washing in a public place without a lower garment. So he mounted the pulpit, praised and extolled Allah and said: Allah is characterised by modesty and concealment. So when any of you washes, he should conceal himself.
أَنَّ رَسُولَ اللَّهِ ﷺ رَأَى رَجُلاً يَغْتَسِلُ بِالْبَرَازِ بِلاَ إِزَارٍ فَصَعِدَ الْمِنْبَرَ فَحَمِدَ اللَّهَ وَأَثْنَى عَلَيْهِ ثُمَّ قَالَ ﷺ إِنَّ اللَّهَ ﷻ حَيِيٌّ سِتِّيرٌ يُحِبُّ الْحَيَاءَ وَالسَّتْرَ فَإِذَا اغْتَسَلَ أَحَدُكُمْ فَلْيَسْتَتِرْ