As you may be aware, the prophets propagated their messages on the basis of two executive guarantees: warning the people and bringing glad tidings for them. They warned people from the agony of fire as a result of sins; and promised them the rewards and great blessings of the hereafter as a result of being obedient to the Almighty Allah.
Let us assume (God Forbid) that Allah (SWT) is an oppressor and that He will punish everyone regardless of their good actions. If this was the case, there would not be a difference between the righteous and the people who have been sinful all their lives; at the end both will be punished equally. Therefore, the set of laws set by Allah (SWT) and expressed by the prophets in the name of "Religion" will lose their guarantee of performance, and the instructions ordained by Allah (SWT) will be questioned. In such a situation, people will fail to see any reason for staying away from the unlawful acts expressed by Allah (SWT).
Hence, according to the religion of Islam, the Shiite school of thought, and morality, "Divine Justice" is not only a principle of the religion of Islam, rather it is a foundation in all the divine religions and the followers of them have implicitly accepted it. Therefore, the foundation of this religion is constructed on this important principle and other principles. One who denies this principle, has actually denied the whole religion.