When justice is done, it is a joy to the righteous
but terror to evildoers.
When justice is done, the righteous are vindicated and the wicked are punished. But the righteous also rejoice in justice for its own sake. They do not obey God's laws to keep from being punished, but because they actually delight in God's law. The wicked fear punishment, but they also are disheartened to see justice winning over evil which they delight in. A world in which justice prevails is not a desirable place in which to live. They must live in fear in such a world.
And that world will someday come when our Lord returns to establish full justice and a new heaven and a new earth are established. In such a world, God "will wipe away every tear from [the eyes of the righteous], and death shall be no more, neither shall there be mourning nor crying nor pain anymore, for the former things have passed away" (Revelation 21:4).
"But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, which is the second death" (21:8).
Thus joy for the righteous and terror for evildoers.