The Idolators requested a Miracle
These stubborn, lying disbelievers said, "Why would not a sign be revealed to Muhammad ﷺ from his Lord." They meant a sign such as given to Salih. Allah sent the she-camel to Thamud. They wanted Allah to change the mount of As-Safa into gold or remove the mountains of Makkah and replace them with gardens and rivers. Allah is capable of doing all of that, but He is All-Wise in His actions and statements. Allah said:
تَبَارَكَ الَّذِى إِن شَآءَ جَعَلَ لَكَ خَيْراً مِّن ذلِكَ جَنَّـتٍ تَجْرِى مِن تَحْتِهَا الاٌّنْهَـرُ وَيَجْعَل لَّكَ قُصُوراً - بَلْ كَذَّبُواْ بِالسَّاعَةِ وَأَعْتَدْنَا لِمَن كَذَّبَ بِالسَّاعَةِ سَعِيراً
(Blessed be He Who, if He wills, will assign you better than (all) that -- Gardens under which rivers flow (Paradise) and will assign you palaces (in Paradise). Nay, they deny the Hour, and for those who deny the Hour, We have prepared a flaming Fire.)25:10-11 He also said:
وَمَا مَنَعَنَآ أَن نُّرْسِلَ بِالاٌّيَـتِ إِلاَّ أَن كَذَّبَ بِهَا الاٌّوَّلُونَ
(And nothing stops Us from sending the Ayat but that the people of old denied them.) 17:59 Allah's way of dealing with His creatures is that He would give to them if they asked things from Him. But if they then didn't believe He would expedite punishment for them. When Allah's Messenger ﷺ was given the choice of Allah giving the people what they requested but if they didn't believe they would be punished, or that their request would not be answered immediately, Allah's Messenger ﷺ chose the latter. Allah guided His Prophet to answer their question by saying:
فَقُلْ إِنَّمَا الْغَيْبُ للَّهِ
(Say: "The Unseen belongs only to Allah...") This Ayah means that the matter in its entirety is for Allah. He is well aware of the outcome of all matters.
فَانتَظِرُواْ إِنِّى مَعَكُم مِّنَ الْمُنتَظِرِينَ
("...so wait you, verily, I am with you among those who wait.") If you would not believe unless you witness that which you asked for, then wait for Allah's judgement for me, as well as for yourselves. Nonetheless, they had witnessed some of the signs and miracles of the Prophet , which were even greater than what they had asked for. In their presence, the Prophet pointed to the moon when it was full and it split into two parts, one part behind the mountain and the other before them. If they were seeking the guidance and firm knowledge by asking for signs, Allah would have known that and would have granted them what had been requested. But Allah knew that it was their obstinacy that was behind their request. Therefore Allah left them to suffer in their suspicion and doubt. Allah knew that none of them would believe. This is similar to Allah's statements:
إِنَّ الَّذِينَ حَقَّتْ عَلَيْهِمْ كَلِمَةُ رَبِّكَ لاَ يُؤْمِنُونَ وَلَوْ جَآءَتْهُمْ كُلُّ ءايَةٍ
(Truly, those, against whom the Word (Wrath) of your Lord has been justified, will not believe. Even if every sign should come to them.)10:9…