Torment is a bad translation. The hadith says:
Were Allah to punish everyone in the heavens and in the earth, He would do so without being unjust to them. And were He to show mercy to them, His mercy would be much better than their actions merited.
That is because all of us have committed sins that would deserve the punishment.
But, the only reason Allah forgives and allows us to get rewarded for frankly little to no effort is that He is Merciful and Loving.
None of us deserve the reward. It is only given from His mercy.
Allah says in the Quran:
And your Lord is the Forgiving, full of mercy. If He were to impose blame upon them for what they earned, He would have hastened for them the punishment. Rather, for them is an appointment from which they will never find an escape. (18:58)
Allah says: ⟪If He were to impose blame upon them for what they earned, He would have hastened for them the punishment.⟫ Meaning: If he truly was to hold people to account for what their actions deserve, they would all fall into punishment.
However, He says: ⟪Rather, for them is an appointment from which they will never find an escape.⟫ Meaning: Because of His mercy, He lets them go until the Day of Judgement. Then, He holds to account those He wishes and forgives the believers.
The Prophet (SAW) said:
"Do good deeds properly, sincerely and moderately, and receive good news because one's good deeds will not make him enter Paradise." They asked, "Even you, O Allah's Messenger (ﷺ)?" He said, "Even I, unless and until Allah bestows His pardon and Mercy on me." (Sahih Bukhari 6467)