Allah Subhanohu wa T'ala says in the Holy Quran:
وَهُوَ الَّذِي خَلَقَ السَّمَاوَاتِ وَالأَرْضَ بِالْحَقِّ وَيَوْمَ يَقُولُ كُن فَيَكُونُ قَوْلُهُ الْحَقُّ وَلَهُ الْمُلْكُ يَوْمَ يُنفَخُ فِي الصُّوَرِ عَالِمُ الْغَيْبِ وَالشَّهَادَةِ وَهُوَ الْحَكِيمُ الْخَبِيرُ
First, that the heavens and the earth have not been created just for the fun of it. This existence is not a theatrical play. This world is not a child's toy with which to amuse oneself as long as one wishes before crushing it to bits and throwing it away. Creation is rather an act of great seriousness. A great objective motivates it, and a wise purpose underlies it. Hence, after the lapse of a certain stage it is necessary for the Creator to take full account of the work that has been done and to use those results as the basis for the next stage. This is stated at various places in the Qur'an in the following manner:
Our Lord, You did not create this in vain (Surah Al 'Imran 3:191).
And We did not create the heavens and the earth and whatever lies in between them playfully (Surah Al-Anbiya' 21:16).
And did you think that We created you out of play and that you will not be brought back to Us? (Surah al-Mu'minun 23:115).
Second, it means that God has created this entire system of the universe on solid foundations of truth. The whole of the universe is based on justice, wisdom and truth. Hence, there is no scope in thesystem for falsehood to take root and prosper. The phenomenon of the prosperity of falsehood which we observe, is to be ascribed to the will of God, Who grants the followers of falsehood the opportunity, if they so wish, to expend their efforts in promoting unrighteousness, injustice and untruth. In the end, however, the earth wfll throw up all the seeds of untruth that have been sown, and in the final reckoning every follower of falsehood will see that the efforts he devoted to cultivating and watering this pernicious tree have all gone to waste.
Third, it means that God has founded the universe on the basis of right, and it is on the ground of being its Creator that He governs it. His command in the universe is supreme since He alone has the right to govern it, the universe being nothing but His creation. If anyone else's commands seem to be carried out in this world, this should not cause any misunderstanding. For in reality the will of no one prevails, and cannot prevail in the universe, for no one has any right to enforce his will.