Why does lady Justice hold a sword?
https://www.theclassroom.com/symbolism-of-lady-justice-12080961.html
History of Lady Justice
The concept of a goddess of justice is old indeed, dating to ancient Egyptian and Greek times. The Egyptians had Ma'at, who stood for order and carried both a sword and the Feather of Truth. The Greeks had the goddess Themis, who stood for law, order and justice (and who, incidentally, was mother to the Fates, who themselves were noted for judging humanity).
The Roman goddess of justice, Justitia, is the most direct inspiration, since she carried the sword, scales and blindfold we are familiar with today, and could often be found depicted outside legal institutions.
The Scales of Justice
The scales of justice date back to Egyptian times, where the god Anubis was invariably depicted with a set of scales to weigh a deceased person's soul against the Feather of Truth. The modern interpretation filters through the Enlightenment's focus on reason, as Lady Justice weighs the factors of a case to render a verdict. The scales imply a mechanistic, rational process; too much weight (evidence) on one side will cause the scales to tilt in favor of innocence or guilt.
Lady Justice's Sword
Lady Justice often carries a sword in one hand. The sword is a historical symbol of authority, wielded by kings, emperors and generals. It is therefore one of the earliest symbols for justice, as the power of a monarch could be delivered with a stroke of the sword. Additionally, the sword has an esteemed place in ceremony even today, as people who are knighted are touched upon the shoulders with a blade. Lady Justice's sword advances the concept that justice can be swift and final.
Alternative explanation is that law has to be backed by force and punishment.