In the Name of Allah, The Most Gracious, Most Merciful
Praise be to Allah, The Lord (The One and Only) of the Worlds, and blessings and peace be upon our Master Muhammad, the Truthful and the Faithful.
If you drive your car, and you see the red traffic light, and there is a policeman, you will stop at once, but why will you stop though you might be a minister? You will do so, because you know that this policeman is appointed by the traffic law, and you know that he sees you, and he can suspend your driving license for a whole year, and you will be fined 50.000 Liras.
I repeat, why do you stop at a red traffic light? Why do you stop when there is surveillance camera? It is because you know beyond doubt that the law will reach you because of the camera or the policeman, who he has the ability to fine you. Therefore, you cannot disobey the law. Now listen to Quran:
﴾ It is Allah Who has created seven heavens and of the earth the like thereof (i.e. seven). His Command descends between them (heavens and earth), that you may know that Allah has power over all things, and that Allah surrounds (comprehends) all things in (His) Knowledge.﴿
This Great Allah uses two of His Beautiful Names in this Ayah: The Omnipotence and The All-Knowing, thus if you know beyond doubt that Allah knows, and He will hold people accountable for their deeds and will punish them upon sinning, you will never disobey Him.