First, while medieval justice was harsh and swift, D&D worlds need not apply a medieval justice system. In fact, as posted elsewhere on this topic, the published Forgotten Realms materials indicate that some justice systems are far more enlightened than others.
Second, the point is exactly...