The weighing scene is not a trial in the modern sense of weighing evidence; it is closer to a test of fit, whether the accumulated weight of a life matches the standard the whole cosmos was supposed to run on. Ma'at names both the feather on the scale and the abstract order it stands for, so the deceased's heart is being checked for consistency with the same principle that was meant to govern kingship, law and the rising of the sun. This is why the weighing follows directly on the Negative Confession, the deceased's declaration of the wrongs they did not commit: the declaration states a claim, and the scale tests it.
Egyptologists read the scene as less a threat than a coaching aid, art meant to prepare the dead by rehearsing exactly what would be asked of them and supplying, through accompanying spells, help in passing. The heart's role as the organ tested is itself doctrinally loaded, since Egyptian anatomy located thought, will and memory in the heart rather than the brain, so what is weighed is effectively the person's moral memory of their own life, not a separate faculty of virtue. The scene had no wide precedent before the New Kingdom and no real successor in Egyptian religion after it; it stands as one of the most fully realized judgment images in the ancient world.