N
It’s explained in the parable of the vineyard workers who think their master is unfair ( Matthew 20:1-16)
Mercy and justice are not opposites. Mercy goes “beyond” justice and forgives. Mercy does not ignore the demands of justice, it absorbs it. Remember our original sin? Jesus absorbed that. No wishy-washy “mercy” there. Pure justice, pure mercy.
Read the OT part of the Bible…