Why did the narrator seek a judge’s acquaintance in unfamiliar cities?

The Alexandrian Maqāmah — A Traveler’s Ambition and a Complaint before the Judge