As‘salaamu alaikum.
To give a good answer to your question would require a long discourse on the dynamics of the Day of Judgment. What I am about to do is, insha‘allah, tell you about 3 major events that Allah and His Messenger (alaihi salaam) told us about regarding the Day of Judgment, and explain a few key concepts that might make certain realities about your Lord clear to you.
The three events I want to tell you about are:
THE GRAND INQUISITION
We each have two angels with us writing down everything we say and do (Qur‘an 50:17-18). They are compiling a Book that is going to contain a perfect account of the lives we lived here in the dunya. We are going to be presented with those Books on the Day of Judgment, which is itself a major event, and Allah is going question us about the contents of our Books.
This questioning will be a terrible event for those who were habitual sinners, because, on the Day of Judgment, everyone will be forced to accept Truth, and all will know that evils and sins spell disaster.
“On the Day when every soul will be confronted with all the good that it has done and all the evil it has done, IT WILL WISH THAT THERE WAS A GREAT DISTANCE BETWEEN IT AND ITS EVIL. Allah Himself is cautioning you, and Allah is full of kindness to those who serve Him.” Qur‘an 3:30
But the situation will be quite different for the righteous. The righteous have been promised an easy reckoning, (84:7-9). And it‘s not that their Books won‘t contain any sins, because everybody sins, but Allah says that the righteous (meaning those who fulfilled their duties as muslims and didn‘t make a habit of wronging others) will not have to answer for their sins. This is part of what it means to receive mercy from Allah on the Day of Judgment.
“Such are they from whom We shall accept the best of their deeds AND PASS OVER THEIR BAD DEEDS.” Qur‘an 46:16
The point of me sharing this with you is to show you, first and foremost, that Allah favors those who strive to please Him. EVERYONE will receive justice on the Day of Judgment. No one will be wronged. But the only ones to receive mercy will be those who feared the Reckoning so much that they actively sought it (Allah‘s Mercy) out in this world with regular worship, good deeds, just dealings with others, and overall conformance to the command of Allah. People “who are certain about the Hereafter” (2:1-4) will strive hard to do all of these things. It is when we get caught up in the dunya that we neglect the acts that will save us and then wonder if Allah will “be shallow enough” to make us eat the fruit of our negligence.
TRUTH: If we don‘t actively pursue Allah‘s Mercy we will have to face His Justice. So we have a choice to make.
THE SETTLING OF DEBTS
Let‘s take a closer look at Allah‘s Justice. This will address your question about the person who was good at worshipping but did a lot of harms to others...
One of the names of the Day of Judgment is the Yawm-ut-Taghaabun - the Day of Mutual Loss and Gain. The reason for this is because it will be a day when (1) people who wronged others will lose their good deeds to those they wronged; and/or (2) people who wronged others will gain some of the bad deeds of those they wronged.
@datakeen mentioned the weighing of good deeds against bad deeds. That comes after the settling of debts.
Doing wrong creates a debt that must be paid, and it WILL be paid - in this world or in the next.
If our wrong is against Allah then there are a number of ways we can sqash the debt. We can do a good deed to cancel out the bad one, (11:114). Or we can make tawbah and be forgiven, (39:53).
But if our wrong is against a creature of Allah, then things are a little different. If we can get them to forgive us then their forgiveness will squash the debt. Otherwise we have to try to make it right with them by compensating them for their loss and harm, if they will accept compensation.
If we go to the Hereafter carrying debts to people then that is where we will have to pay the debt off. On the Day of Judgment there is only one thing we can pay with - our good deeds.
There is a well known hadith where the Prophet (a.s.) asked his Companions, “Who is the poor one among us?” They said, “The one who has no wealth and no property.” The Prophet (a.s.) said, “A poor one of my Ummah is the one who appears on the Day of Judgment having performed salat, paid zakat, observed the fasts of Ramadan, and fulfilled all other obligations. But they also abused someone, slandered someone, misappropriated money from someone, shed the blood of someone unjustly, or beaten someone unjustly. Each one of them will be given a share of his good deeds. If he does not have enough good deeds to pay off all these debts then their sins will be transferred to his account and he will then be thrown into the Fire.”
That is the Justice of Allah. True righteousness includes respecting the rights of Allah‘s creatures, not just offering Him ritual worship.
THE WEIGHING OF THE DEEDS
“We shall set up scales of justice for the Day of Judgment, so that not a soul will be dealt with unjustly in the least. And if there be the weight of a mustard seed We will bring it, and We are enough to take account.” Qur‘an 21:47
“Then he whose balance (of good deeds) will be heavy, will be in a life of good pleasure and satisfaction. But he whose balance will be light, his mother will be the Pit. And what will explain to you what she is? A Fire blazing fiercely!” Qur‘an 101:6-11
The people who outright reject Faith are lost, and this event is proof of that. In this event Allah is going to weigh people‘s good deeds against their bad deeds. But the kufaar are not going to have any good deeds to counterbalance their bad deeds, because Allah has said that He is not going to give the good deeds of the kufaar any weight, (3:116-117; 18:103-106; 25:21-23).
This event will be iffy for certain types of muslims. By the Grace of Allah our good deeds will reach the akhirah to help us. But our bad deeds will also be there to work against us, (as they did during the settling of debts). These are the difficulties that will come from being negligent of the Deen in this Dunya, missing prayers, partaking of haraam foods and substances, and allowing our thinking to be far too heavily influenced by our kufaar associates or the sentiments of the society we may be living in. We accumulate A LOT of sins and are not active enough in the doing of good. During the weighing of deeds we are going to regret this.
Allah the Most High can never be accused of being shallow. It is we who are short-sighted and shallow. We have been fully informed and amply warned about the Day of Judgment and the Hellfire. We have been shown the way to avoid the Fire and all hardships of the Day of Judgment. But we don‘t like the Guidance BECAUSE IT INTERFERES WITH OUR ENJOYMENT OF THE DUNYA. But this dunya is NOTHING in the True scheme of things.
Our Lord is not a sadist. He does not want to punish anyone, (4:147). He sent us His Guidance to allow us to do all we can to AVOID His Punishment, (2:38-39). He has generously offered to count each good deed we do as 10 good deeds, while counting each bad deed as only one bad deed, (6:160), AND He has offered to forgive ALL bad deeds (except shirk), (39:53; and 4:48, 116).
In return for all of that He has asked us to devote our whole selves to Him. He wants us to believe in Him alone, pray regularly, be kind to others, abstain from the worst sins, be conservative in our spending, dress modestly, be polite and courteous when we interact with others, don‘t be sexually promiscuous, be just and fair to everyone, and stand ready to advance or defend His Deen. None of that makes for a bad life.
It is people who are shallow and foolish. Allah is Akbar!
I hope some good comes from this answer.
Ma‘as‘salaam