There were people who would question the Messenger of Allah ﷺ in mockery. One man would ask, "Who is my father?" Another, whose camel had strayed, would ask, "Where is my camel?" So Allah revealed concerning them this verse, "You who believe, do not ask about things which, if made clear to you, would grieve you" [Maidah 5:101], and he recited the verse through to its end.
كان: قوم يسألون رسول الله ﷺ استهزاء، فيقول الرجل: من أبي؟ ويقول الرجل تضل ناقته: أين ناقتي؟ فأنزل الله فيهم هذه الآية: {يأيها الذين ءامنوا لا تسألوا عن أشياء إن تبد لكم تسؤكم} حتى فرغ من الآية كلها.