Verse 8

धर्मराजोऽथ तं देशं कदाचित्समुपाययौ ।महानरककार्याणां विचारार्थं यदृच्छया

In plain words

Then Dharmarāja once came by chance to that region, to examine the affairs of the great hells.