Some people were asking Messenger of Allah ﷺ questions mockingly. A man would say, "Who is my father?" Another man whose she-camel had gone astray would say, "Where is my she-camel? "So Allah revealed this Verse in this connection: "O you who believe! Ask not about things which, if made plain to you, may cause you trouble." (5.101)
كَانَ قَوْمٌ يَسْأَلُونَ رَسُولَ اللَّهِ ﷺ اسْتِهْزَاءً فَيَقُولُ الرَّجُلُ مَنْ أَبِي وَيَقُولُ الرَّجُلُ تَضِلُّ نَاقَتُهُ أَيْنَ نَاقَتِي فَأَنْزَلَ اللَّهُ فِيهِمْ هَذِهِ الآيَةَ {يَا أَيُّهَا الَّذِينَ آمَنُوا لاَ تَسْأَلُوا عَنْ أَشْيَاءَ إِنْ تُبْدَ لَكُمْ تَسُؤْكُمْ} حَتَّى فَرَغَ مِنَ الآيَةِ كُلِّهَا