How did the people justify this barbaric system?
The people had nothing to say about the system. If any one of them had ventured to criticize any aspect or any official, he would have his head chopped off, or perhaps get fed to a hungry tiger. As the narrator states in the opening sentence:
In the very olden time there lived a semi-barbaric king, whose ideas, though somewhat polished and sharpened by the progressiveness of distant Latin neighbors, were still large, florid, and untrammeled, as became the half of him which was barbaric.
This was ancient times. The king was an absolute ruler. He ruled by force and fear, and that was the only kind of government the people ever knew. If the king in "The Lady or the Tiger?" had not been such a barbaric ruler, he would not have been able to stage the sort of spectacle described in the story. His purpose in forcing a prisoner to choose between the two doors was largely to demonstrate his autocratic powers. There was no such thing as voting, and there were no politicians to represent the people. The author may be referring to the times of rulers like Genghis Khan (c. 1162 – 18 August 1227).