Question: how azdak became a judge?
Answer: After squaring off against the Fat Prince's nephew in a mock trial to determine who was better suited to be the judge, Azdak is appointed judge by the Ironshirts despite the Fat Prince's nepotistic desire to appoint his own nephew.