If you have small children, you may have told them that they are not allowed to answer the door, or to talk to strangers. Since they are your children, it is morally wrong for them to disobey you, at least in any circumstance where your commands do not go directly against God's commands (Ephesians 6:1; Colossians 3:20). This means that it would be morally wrong for your children to answer the door, or to talk to strangers, because in so doing, they would be disobeying you.
If it is morally wrong for your children to answer the door or talk to strangers, is it also morally wrong for you to answer the door or to talk to strangers?
The answer, of course, is no.
Likewise, God has commanded us not to kill humans. This means that it is morally wrong for us to do so. However, this does not mean that it is morally wrong for God to do so.
Indeed, if there were no retribution for sin, such as the obliteration of Sodom for their disobedience, God would not be just, and then nothing (including God) could be considered objectively just or objectively unjust.
Interestingly enough, this seems to be an enormous problem for Islam.
In Islam, Muslims are commanded to judge justly (49:9, 55:7-9, 57:25, 60:8, etc). If justice is subjective rather than objective, then this command is basically meaningless. Thus, Muslims must apparently believe that certain types of judgments are inherently just, and other types of judgments are inherently unjust; or, in other words, that justice is an objectively fixed concept. I think most people would agree with this.
Justice is defined as the virtue which consists in giving to everyone what is his due; it is vindictive retribution and merited punishment; and objective justice always conforms exactly to principles of rectitude; Justice is the way we ought to judge.
If Allah ever commanded his people to be "unjust", if any of His commands demanded that justice NOT be served, then Allah would be acting in opposition to justice. If Allah were acting in opposition to justice, then it would no longer be a virtue to act justly, for instead, the Muslim should obey Allah and oppose justice, if Allah were in opposition to justice.
According to the Qur'an, Allah is absolutely always just (4:40, 2:272, 2:281, 3:18, 3:108, 50:29 etc), so we see that according to Islam, there is never a time that Allah is in opposition to justice.
However, in addition to always being just, and commanding His followers to judge justly, Allah also commands His followers to be forgiving -- to pardon and to overlook sin (24:22, 45:14, 64:14). Additionally, Allah Himself is also forgiving, overlooking sin (4:23, 4:25, 4:43, 5:18, 8:29, 28:16, 39:5, 57:28, etc).
To forgive is to overlook sin; to treat the offender as not guilty; to give up a punishment due to a crime.
If Allah forgives (refusing to provide vindictive retribution and merited punishment), then how is it that He is always just (providing vindictive retribution and merited punishment)?
In Islam, Allah is always just, and it is not the case that Allah is always just, a logical contradiction, rendering the Islamic worldview utterly incoherent.
In Christianity, this is not a problem. In Christianity, Christ voluntarily takes on our vindictive retribution. He places our merited punishment on His own shoulders. He is punished for our sins and is the complete satisfaction of justice (Isaiah 53:5; John 15:13; 1 John 2:2; 1 John 4:10).
In Christianity, God is always just and is also forgiving and merciful, and these two aspects of His character are fully logical and completely coherent. In fact, if the God of Christianity did not exist, it would be literally impossible to make sense of anything at all.