But ideas of what is “just” change and the justice system is often slow to react. Sometimes things that are technically unjust (banning gay marriage) are allowed. Slavery was once legal. Justice system at the time said so. Also, as an anecdote, speaking as someone who has participated in the justice system quite a bit, for me it was very rarely the best determinant of what was “just” on the small scale of my life. I would hesitate to assume on the larger scale of society as a whole it is any more accurate.