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:96-97 and;

وَلَوْ أَنَّنَا نَزَّلْنَآ إِلَيْهِمُ الْمَلَـئِكَةَ وَكَلَّمَهُمُ الْمَوْتَى وَحَشَرْنَا عَلَيْهِمْ كُلَّ شَىْءٍ قُبُلاً مَّا كَانُواْ لِيُؤْمِنُواْ إِلاَّ أَن يَشَآءَ اللَّهُ

(And even if We had sent down unto them angels, and the dead had spoken unto them, and We had gathered together all things before their very eyes, they would not have believed, unless Allah willed.)6:111 This was in addition to their arrogance. As Allah said in another Ayah:

وَلَوْ فَتَحْنَا عَلَيْهِم بَاباً مِّنَ السَّمَاءِ

(And even if We opened to them a gate from the heaven.) 15:14 And He said:

وَإِن يَرَوْاْ كِسْفاً مِّنَ السَّمَآءِ سَـقِطاً

(And if they were to see a piece of the heaven falling down.)52:44 He also said:

وَلَوْ نَزَّلْنَا عَلَيْكَ كِتَـباً فِى قِرْطَاسٍ فَلَمَسُوهُ بِأَيْدِيهِمْ لَقَالَ الَّذِينَ كَفَرُواْ إِنْ هَـذَآ إِلاَّ سِحْرٌ مُّبِينٌ

(And even if We had sent down unto you (O Muhammad) a Message written on paper so that they could touch it with their hands, the disbelievers would have said: `This is nothing but obvious magic!')6:7 Such people don't deserve to have their requests answered, for there is no benefit in answering them. These people are obstinate and stubborn as a result of their corruption and immorality. Therefore Allah told His Messenger to say:

فَانتَظِرُواْ إِنِّى مَعَكُم مِّنَ الْمُنتَظِرِينَ

(So wait you, verily, I am with you among those who wait.)