There will be two groups in the Hereafter:
A group in Paradise: They are the guided ones who followed the guidance of the Prophets and Messengers and all that they brought with them in the Divine Messages.
A group in the Hellfire: They are the ones who disbelieved in and rejected the signs of Allah.
Therefore, there will be rewards and punishments based on what has been revealed of the commands and prohibitions.
In the human-made laws, there must be deterrents such as punishments to stop people from committing things which are prohibited. For example, the pilferer is jailed, the one who is late for work gets a part of his salary cut and the one who is always absent from work is sacked.
In the same way, Allah U has laid down punishments for the violation of His laws. And as long as there are punishments, there will inevitably be: “Do this!” and “Do not do that!” Thus, Allah U says:
﴾وَالَّذِينَ كَفَرُوا وَكَذَّبُوا بِآيَاتِنَا أُوْلَئِكَ أَصْحَابُ النَّارِ هُمْ فِيهَا خَالِدُونَ﴿
“And those who disbelieve and deny Our signs – those will be companions of the Fire; they will abide therein eternally.”