Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:7:28

And when they commit an immorality, they say, "We found our fathers doing it, and Allah has ordered us to do it." Say, "Indeed, Allah does not order immorality. Do you say about Allah that which you do not know?"  

And when they commit any indecency, such as idolatry, or circumambulating the ˹Sacred˺ House naked, saying, ‘We cannot perform the circumambulations wearing clothes in which we were disobedient to God’ — and so they forbade this ˹wearing of clothes˺ — they say, ‘We found our fathers practising it, and so we followed their example, and God has, also, enjoined it on us’. Say, to them: ‘God does not enjoin indecency. Do you say concerning God that which you do not know?’, that He has said? (the interrogative is meant as a repudiation).
القرآن:٧:٢٨

وَإِذَا فَعَلُوا فَاحِشَةً قَالُوا وَجَدْنَا عَلَيْهَا آبَاءَنَا وَاللَّهُ أَمَرَنَا بِهَا ۗ قُلْ إِنَّ اللَّهَ لَا يَأْمُرُ بِالْفَحْشَاءِ ۖ أَتَقُولُونَ عَلَى اللَّهِ مَا لَا تَعْلَمُونَ  

{وإذا فعلوا فاحشة} كالشرك وطوافهم بالبيت عراة قائلين لا نطوف في ثياب عصينا الله فيها فنهوا عنها {قالوا وجدنا عليها آباءنا} فاقتدينا بهم {والله أمرنا بها} أيضا {قل} لهم {إن الله لا يأمر بالفحشاء أتقولون على الله ما لا تعلمون} أنه قاله، استفهام إنكار.