It is a beautiful metaphor. At least Pirandello sees some connection between truth and justice.
Everyone comes to a trial with their own truth and a decision comes out of it, but can we reconstitute what truths brought about this decision? It is similar with all truths in life. We have all that data, some we trust more and some we trust less, and from all that data we need to make a decision, or a story of what happens. This is how all science is done. Art seems to me to come to always question our stories and how we constitute them. Always making us doubt our story. Doubt how we piece together data to a coherent picture and show us there is always a different picture in the background.
We know from history, from documentaries, that people were condemned while innocent, but we need art to explain this to us. We know scientific beliefs change, but we still believe in them. I wonder why?